Commit 57ce7124fc958c70dfc366075a62ad19a4195177
1 parent
94befdd5
Exists in
master
and in
4 other branches
Fixed invalid commit show if git history broken
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
app/models/project.rb
@@ -260,7 +260,7 @@ class Project < ActiveRecord::Base | @@ -260,7 +260,7 @@ class Project < ActiveRecord::Base | ||
260 | 260 | ||
261 | def commit(commit_id = nil) | 261 | def commit(commit_id = nil) |
262 | commit = if commit_id | 262 | commit = if commit_id |
263 | - repo.commits(commit_id).first | 263 | + repo.commit(commit_id) |
264 | else | 264 | else |
265 | repo.commits.first | 265 | repo.commits.first |
266 | end | 266 | end |