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
This commit is contained in:
parent
09e76f2907
commit
be67b2ec41
@ -79,13 +79,15 @@ module Redmine
|
|||||||
def branches
|
def branches
|
||||||
return @branches if @branches
|
return @branches if @branches
|
||||||
@branches = []
|
@branches = []
|
||||||
cmd = "#{self.class.sq_bin} --git-dir #{target('')} branch --no-color"
|
cmd_args = %w|branch --no-color|
|
||||||
shellout(cmd) do |io|
|
scm_cmd(*cmd_args) do |io|
|
||||||
io.each_line do |line|
|
io.each_line do |line|
|
||||||
@branches << line.match('\s*\*?\s*(.*)$')[1]
|
@branches << line.match('\s*\*?\s*(.*)$')[1]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@branches.sort!
|
@branches.sort!
|
||||||
|
rescue ScmCommandAborted
|
||||||
|
nil
|
||||||
end
|
end
|
||||||
|
|
||||||
def tags
|
def tags
|
||||||
|
Loading…
x
Reference in New Issue
Block a user