From a4d1d42792c80ef47be63493cd14ad8bc9ecc7c5 Mon Sep 17 00:00:00 2001 From: Alexander Machehin Date: Mon, 11 Feb 2013 23:40:17 +0600 Subject: [PATCH] [refs #878] fix commit treeish --- app/models/project.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/project.rb b/app/models/project.rb index 264e77fe4..42b60419e 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -179,6 +179,7 @@ class Project < ActiveRecord::Base end def default_head treeish = nil # maybe need change 'head'? + return treeish if repo.commit(treeish).present? if repo.branches_and_tags.map(&:name).include?(treeish || default_branch) treeish || default_branch else