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)
|
def commit(commit_id = nil)
|
||||||
commit = if commit_id
|
commit = if commit_id
|
||||||
repo.commits(commit_id).first
|
repo.commit(commit_id)
|
||||||
else
|
else
|
||||||
repo.commits.first
|
repo.commits.first
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue