From 64d65b6e27ce7eab6dfa6d0d51bd73c16b2afb06 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 21 Jan 2015 10:58:45 +0000 Subject: [PATCH] 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 --- lib/redmine/scm/adapters/git_adapter.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- 2.39.5