Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed comma setup #301

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions lib/svn2git/migration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -295,21 +295,22 @@ def fix_tags
@tags.each do |tag|
tag = tag.strip
id = tag.gsub(%r{^svn\/tags\/}, '').strip
subject = run_command("git log -1 --pretty=format:'%s' \"#{escape_quotes(tag)}\"").chomp("'").reverse.chomp("'").reverse
date = run_command("git log -1 --pretty=format:'%ci' \"#{escape_quotes(tag)}\"").chomp("'").reverse.chomp("'").reverse
author = run_command("git log -1 --pretty=format:'%an' \"#{escape_quotes(tag)}\"").chomp("'").reverse.chomp("'").reverse
email = run_command("git log -1 --pretty=format:'%ae' \"#{escape_quotes(tag)}\"").chomp("'").reverse.chomp("'").reverse
subject = run_command("git log -1 --pretty=format:'%s' \'#{escape_quotes(tag)}\'").chomp("'").reverse.chomp("'").reverse
date = run_command("git log -1 --pretty=format:'%ci' \'#{escape_quotes(tag)}\'").chomp("'").reverse.chomp("'").reverse
author = run_command("git log -1 --pretty=format:'%an' \'#{escape_quotes(tag)}\'").chomp("'").reverse.chomp("'").reverse
email = run_command("git log -1 --pretty=format:'%ae' \'#{escape_quotes(tag)}\'").chomp("'").reverse.chomp("'").reverse
run_command("#{git_config_command} user.name \"#{escape_quotes(author)}\"")
run_command("#{git_config_command} user.email \"#{escape_quotes(email)}\"")

original_git_committer_date = ENV['GIT_COMMITTER_DATE']
ENV['GIT_COMMITTER_DATE'] = escape_quotes(date)
run_command("git tag -a -m \"#{escape_quotes(subject)}\" \"#{escape_quotes(id)}\" \"#{escape_quotes(tag)}\"")
run_command("git tag -a -m \'#{escape_quotes(subject)}\' \'#{escape_quotes(id)}\' \'#{escape_quotes(tag)}\'")
ENV['GIT_COMMITTER_DATE'] = original_git_committer_date

run_command("git branch -d -r \"#{escape_quotes(tag)}\"")
run_command("git branch -d -r \'#{escape_quotes(tag)}\'")
end


ensure
# We only change the git config values if there are @tags available. So it stands to reason we should revert them only in that case.
unless @tags.empty?
Expand Down