From: Toshi MARUYAMA Date: Sat, 19 Mar 2011 15:50:08 +0000 (+0000) Subject: scm: git: default_branch() returns nil explicitly if branches are empty. X-Git-Tag: 1.2.0~675 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3ea7b9a7688b5cfac6005f1b61d459e26995b20a;p=redmine.git 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 --- diff --git a/lib/redmine/scm/adapters/git_adapter.rb b/lib/redmine/scm/adapters/git_adapter.rb index 6d012a7ec..88acc2ed5 100644 --- a/lib/redmine/scm/adapters/git_adapter.rb +++ b/lib/redmine/scm/adapters/git_adapter.rb @@ -102,7 +102,7 @@ module Redmine def default_branch bras = self.branches - return if bras.nil? + return nil if bras.nil? bras.include?('master') ? 'master' : bras.first end