scm: git: default_branch() returns nil explicitly if branches are empty.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5168 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2011-03-19 15:50:08 +00:00
parent 08429506c5
commit 3ea7b9a768
1 changed files with 1 additions and 1 deletions

View File

@ -102,7 +102,7 @@ module Redmine
def default_branch def default_branch
bras = self.branches bras = self.branches
return if bras.nil? return nil if bras.nil?
bras.include?('master') ? 'master' : bras.first bras.include?('master') ? 'master' : bras.first
end end