From 6097e247f4a6d305fb674f9035799a0b67d13fd1 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 21 Jan 2015 10:58:57 +0000 Subject: [PATCH] scm: git: branches return cache too when there is no branch (#18923) git-svn-id: http://svn.redmine.org/redmine/trunk@13927 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 513d4a106..b12bbea34 100644 --- a/lib/redmine/scm/adapters/git_adapter.rb +++ b/lib/redmine/scm/adapters/git_adapter.rb @@ -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| -- 2.39.5