]> source.dussan.org Git - redmine.git/commitdiff
scm: git: branches return cache too when there is no branch (#18923)
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 21 Jan 2015 10:58:57 +0000 (10:58 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 21 Jan 2015 10:58:57 +0000 (10:58 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@13927 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/scm/adapters/git_adapter.rb

index 513d4a1060e6e6d7eeffaac95a99864ea3b0b5fc..b12bbea3413e8a7c69c6d95071b08977ac53fd02 100644 (file)
@@ -76,7 +76,7 @@ module Redmine
         end
 
         def branches
-          return @branches if @branches
+          return @branches if !@branches.nil?
           @branches = []
           cmd_args = %w|branch --no-color --verbose --no-abbrev|
           git_cmd(cmd_args) do |io|