Class | Git::Object::Commit |
In: |
lib/git/object.rb
|
Parent: | AbstractObject |
# File lib/git/object.rb, line 170 def initialize(base, sha, init = nil) super(base, sha) if init set_commit(init) end end
# File lib/git/object.rb, line 226 def set_commit(data) if data['sha'] @sha = data['sha'] end @committer = Git::Author.new(data['committer']) @author = Git::Author.new(data['author']) @tree = Git::Object::Tree.new(@base, data['tree']) @parents = data['parent'].map{ |sha| Git::Object::Commit.new(@base, sha) } @message = data['message'].chomp end