scm: git: explicitly return string as default branch (#10207)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8857 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
2fa19441a7
commit
58996e891e
|
@ -111,8 +111,9 @@ module Redmine
|
|||
bras = self.branches
|
||||
return nil if bras.nil?
|
||||
default_bras = bras.select{|x| x.is_default == true}
|
||||
return default_bras.first if ! default_bras.empty?
|
||||
bras.include?('master') ? 'master' : bras.first
|
||||
return default_bras.first.to_s if ! default_bras.empty?
|
||||
master_bras = bras.select{|x| x.to_s == 'master'}
|
||||
master_bras.empty? ? bras.first.to_s : 'master'
|
||||
end
|
||||
|
||||
def entry(path=nil, identifier=nil)
|
||||
|
|
Loading…
Reference in New Issue