From 3ea7b9a7688b5cfac6005f1b61d459e26995b20a Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sat, 19 Mar 2011 15:50:08 +0000 Subject: [PATCH] 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 --- lib/redmine/scm/adapters/git_adapter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.39.5