[refs #878] fix commit treeish

This commit is contained in:
Alexander Machehin 2013-02-11 23:40:17 +06:00
parent 9ff869f167
commit a4d1d42792
1 changed files with 1 additions and 0 deletions

View File

@ -179,6 +179,7 @@ class Project < ActiveRecord::Base
end end
def default_head treeish = nil # maybe need change 'head'? 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) if repo.branches_and_tags.map(&:name).include?(treeish || default_branch)
treeish || default_branch treeish || default_branch
else else