[refs #878] fix bug with default head

This commit is contained in:
Alexander Machehin 2013-01-31 23:18:57 +06:00
parent 8860238da4
commit 913b8469fe
1 changed files with 1 additions and 1 deletions

View File

@ -180,7 +180,7 @@ class Project < ActiveRecord::Base
def default_head treeish = nil # maybe need change 'head'? def default_head treeish = nil # maybe need change 'head'?
if repo.branches_and_tags.map(&:name).include?(treeish || default_branch) if repo.branches_and_tags.map(&:name).include?(treeish || default_branch)
treeish treeish || default_branch
else else
repo.branches_and_tags[0].try(:name) || 'master' repo.branches_and_tags[0].try(:name) || 'master'
end end