##// END OF EJS Templates
scm: git: explicitly return string as default branch (#10207)...
Toshi MARUYAMA -
r8737:58996e891ef7
parent child
Show More
@@ -111,8 +111,9 module Redmine
111 bras = self.branches
111 bras = self.branches
112 return nil if bras.nil?
112 return nil if bras.nil?
113 default_bras = bras.select{|x| x.is_default == true}
113 default_bras = bras.select{|x| x.is_default == true}
114 return default_bras.first if ! default_bras.empty?
114 return default_bras.first.to_s if ! default_bras.empty?
115 bras.include?('master') ? 'master' : bras.first
115 master_bras = bras.select{|x| x.to_s == 'master'}
116 master_bras.empty? ? bras.first.to_s : 'master'
116 end
117 end
117
118
118 def entry(path=nil, identifier=nil)
119 def entry(path=nil, identifier=nil)
General Comments 0
You need to be logged in to leave comments. Login now