diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2015-01-21 10:58:45 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2015-01-21 10:58:45 +0000 |
commit | 64d65b6e27ce7eab6dfa6d0d51bd73c16b2afb06 (patch) | |
tree | a9d28499a5be23bbc2b6ab23ba55f11e4638f63c /lib/redmine | |
parent | cb8639a7b22f1063b8f0c0cb66938c52188b8d1b (diff) | |
download | redmine-64d65b6e27ce7eab6dfa6d0d51bd73c16b2afb06.tar.gz redmine-64d65b6e27ce7eab6dfa6d0d51bd73c16b2afb06.zip |
scm: git: explicitly tags return [] if there is no tag (#18923)
git-svn-id: http://svn.redmine.org/redmine/trunk@13926 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine')
-rw-r--r-- | lib/redmine/scm/adapters/git_adapter.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/redmine/scm/adapters/git_adapter.rb b/lib/redmine/scm/adapters/git_adapter.rb index 2f295d872..513d4a106 100644 --- a/lib/redmine/scm/adapters/git_adapter.rb +++ b/lib/redmine/scm/adapters/git_adapter.rb @@ -95,11 +95,13 @@ module Redmine end def tags - return @tags if @tags + return @tags if !@tags.nil? + @tags = [] cmd_args = %w|tag| git_cmd(cmd_args) do |io| @tags = io.readlines.sort!.map{|t| t.strip} end + @tags rescue ScmCommandAborted nil end |