Project

General

Profile

Actions

Patch #18923

closed

Git: fix empty repository.tags

Added by Nicolas Rodriguez over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
SCM
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

in lib/redmine/scm/adapter/git_adapter.rb the tags method should return @tags as last statement :

def tags
  return @tags if @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

otherwise get an empty string.

Actions #1

Updated by Toshi MARUYAMA over 9 years ago

  • Subject changed from Fix empty repository.tags to Git: fix empty repository.tags
Actions #2

Updated by Toshi MARUYAMA over 9 years ago

  • Status changed from New to Closed

otherwise get an empty string.

I cannot reproduce.

$ RAILS_ENV=test ruby bin/rails console
Loading test environment (Rails 4.2.0)
1.9.3-p551 :001 > adapter = Redmine::Scm::Adapters::GitAdapter.new("/REDMINE/bare-dir/test00.git",nil,nil,nil,"UTF-8")
Shelling out: 'git' --version --no-color
Shelling out: 'git' '--git-dir' '/REDMINE/bare-dir/test00.git' 'log' '--no-color' '--encoding=UTF-8' '--date=iso' '--pretty=fuller' '--no-merges' '-n' '1'
 => #<Redmine::Scm::Adapters::GitAdapter:0x000000049b9020 @url="/REDMINE/bare-dir/test00.git", @root_url="/REDMINE/bare-dir/test00.git", @path_encoding="UTF-8"> 
1.9.3-p551 :002 > adapter.tags
Shelling out: 'git' '--git-dir' '/REDMINE/bare-dir/test00.git' 'tag'
 => [] 
1.9.3-p551 :003 >

But, I have committed in trunk r13926 and r13927.

Actions #3

Updated by Nicolas Rodriguez over 9 years ago

But, I have committed in trunk r13926 and r13927.

It works :)

Thank you!

Actions

Also available in: Atom PDF