From 57ce7124fc958c70dfc366075a62ad19a4195177 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 7 Mar 2012 00:15:43 -0800 Subject: [PATCH] Fixed invalid commit show if git history broken --- app/models/project.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/project.rb b/app/models/project.rb index 5c1d7946..b7445db0 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -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