]> source.dussan.org Git - redmine.git/commitdiff
scm: git: use scm_cmd() in adapter tags().
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 8 Mar 2011 06:10:53 +0000 (06:10 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 8 Mar 2011 06:10:53 +0000 (06:10 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5046 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/scm/adapters/git_adapter.rb

index 175cc6c3713de47515fd510f7d18b89f17ac8660..018ac459f496ed8c166babf4180b81f23d0908d7 100644 (file)
@@ -92,10 +92,12 @@ module Redmine
 
         def tags
           return @tags if @tags
-          cmd = "#{self.class.sq_bin} --git-dir #{target('')} tag"
-          shellout(cmd) do |io|
+          cmd_args = %w|tag|
+          scm_cmd(*cmd_args) do |io|
             @tags = io.readlines.sort!.map{|t| t.strip}
           end
+        rescue ScmCommandAborted
+          nil
         end
 
         def default_branch