Commit be67b2ec authored by Toshi MARUYAMA's avatar Toshi MARUYAMA Committed by Eric Davis

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
parent 09e76f29
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment