2 # converted from the gitrb project
5 # Matthias Lederhofer <matled@gmx.net>
6 # Simon 'corecode' Schubert <corecode@fs.ei.tum.de>
8 # provides native ruby access to git objects and pack files
22 OBJ_TYPES = [nil, :commit, :tree, :blob, :tag].freeze
25 attr_accessor :type, :content
26 def initialize(type, content)
32 Digest::SHA1.digest("%s %d\0" % [@type, @content.length] + @content)