Fixed invalid commit show if git history broken
This commit is contained in:
parent
94befdd502
commit
57ce7124fc
|
@ -260,7 +260,7 @@ class Project < ActiveRecord::Base
|
|||
|
||||
def commit(commit_id = nil)
|
||||
commit = if commit_id
|
||||
repo.commits(commit_id).first
|
||||
repo.commit(commit_id)
|
||||
else
|
||||
repo.commits.first
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue