Commit 57ce7124 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fixed invalid commit show if git history broken

parent 94befdd5
...@@ -260,7 +260,7 @@ class Project < ActiveRecord::Base ...@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment