From dc4ab44938f616f6dadf87b4bd76650a0f08c040 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Tue, 8 Mar 2011 05:18:04 +0000 Subject: [PATCH] scm: git: use scm_cmd() in adapter branches(). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5043 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/scm/adapters/git_adapter.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/redmine/scm/adapters/git_adapter.rb b/lib/redmine/scm/adapters/git_adapter.rb index b1db687e1..175cc6c37 100644 --- a/lib/redmine/scm/adapters/git_adapter.rb +++ b/lib/redmine/scm/adapters/git_adapter.rb @@ -79,13 +79,15 @@ module Redmine def branches return @branches if @branches @branches = [] - cmd = "#{self.class.sq_bin} --git-dir #{target('')} branch --no-color" - shellout(cmd) do |io| + cmd_args = %w|branch --no-color| + scm_cmd(*cmd_args) do |io| io.each_line do |line| @branches << line.match('\s*\*?\s*(.*)$')[1] end end @branches.sort! + rescue ScmCommandAborted + nil end def tags -- 2.39.5