]> source.dussan.org Git - redmine.git/commitdiff
scm: git: default_branch() returns nil explicitly if branches are empty.
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 19 Mar 2011 15:50:08 +0000 (15:50 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 19 Mar 2011 15:50:08 +0000 (15:50 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5168 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/scm/adapters/git_adapter.rb

index 6d012a7ec74eeb4a73a73f99bcdd3d3d694266b7..88acc2ed5a49655d1822415f8753c96b37409333 100644 (file)
@@ -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