[refs #878] fix commit treeish
This commit is contained in:
parent
9ff869f167
commit
a4d1d42792
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue