lib/grit/git-ruby/internal/raw_object.rb in grit-2.4.1 vs lib/grit/git-ruby/internal/raw_object.rb in grit-2.5.0
- old
+ new
@@ -29,9 +29,16 @@
end
def sha1
Digest::SHA1.digest("%s %d\0" % [@type, @content.length] + @content)
end
+
+ def to_hash
+ {
+ :type => @type,
+ :content => @content
+ }
+ end
end
end
end
end