[refs #878] fix bug with default head
This commit is contained in:
parent
8860238da4
commit
913b8469fe
|
@ -180,7 +180,7 @@ class Project < ActiveRecord::Base
|
|||
|
||||
def default_head treeish = nil # maybe need change 'head'?
|
||||
if repo.branches_and_tags.map(&:name).include?(treeish || default_branch)
|
||||
treeish
|
||||
treeish || default_branch
|
||||
else
|
||||
repo.branches_and_tags[0].try(:name) || 'master'
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue