lib/git_store/tree.rb
# Write this tree back to the git repository.
#
# Returns the object id of the tree.
Write this tree back to the git repository.
Returns the object id of the tree.
Write this tree back to the git repository . Returns the object id of the tree .
def write_to_store
      return id if not modified?
      contents = table.map do |name, entry|
        entry.write_to_store
        "%s %s\0%s" % [entry.mode, name, [entry.id].pack("H*")]
      end
      @modified = false
      @id = store.put_object(contents.join, 'tree')
    end
def write_to_store return id if not modified? contents = table . map do | name , entry | entry . write_to_store "%s %s\0%s" % [ entry . mode , name , [ entry . id ] . pack ( "H*" ) ] end @modified = false @id = store . put_object ( contents . join , 'tree' ) end
Write this tree back to the git repository.
Write this tree back to the git repository .