Fixed styles, ProjectHook specs etc

This commit is contained in:
Dmitriy Zaporozhets 2013-01-05 00:35:38 +02:00
parent c6298678f5
commit e16cebac3e
22 changed files with 111 additions and 76 deletions

View file

@ -98,6 +98,8 @@ class Commit
end
def initialize(raw_commit, head = nil)
raise "Nil as raw commit passed" unless raw_commit
@commit = raw_commit
@head = head
end
@ -136,7 +138,11 @@ class Commit
end
def prev_commit
parents.try :first
@prev_commit ||= if parents.present?
Commit.new(parents.first)
else
nil
end
end
def prev_commit_id