Skip to content
This repository was archived by the owner on Jan 24, 2021. It is now read-only.

Commit 7774b36

Browse files
author
Aaron Boxer
committed
removed --local option for git config; there is no such option in current version of git
1 parent 0c86b47 commit 7774b36

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lib/svn2git/migration.rb

+7-7
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ def clone!
227227
if not authors.nil?
228228
cmd = "git "
229229
cmd += "--git-dir='#{repos}' " unless repos == ''
230-
cmd += "config --local svn.authorsfile #{authors}"
230+
cmd += "config svn.authorsfile #{authors}"
231231
run_command(cmd)
232232
end
233233

@@ -282,8 +282,8 @@ def fix_tags
282282

283283
current = {}
284284
if !@options[:bare]
285-
current['user.name'] = run_command("#{_cmd} config --local --get user.name", false)
286-
current['user.email'] = run_command("#{_cmd} config --local --get user.email", false)
285+
current['user.name'] = run_command("#{_cmd} config --get user.name", false)
286+
current['user.email'] = run_command("#{_cmd} config --get user.email", false)
287287
end
288288

289289
@tags.each do |tag|
@@ -294,8 +294,8 @@ def fix_tags
294294
author = run_command("#{_cmd} log -1 --pretty=format:'%an' #{tag}")
295295
email = run_command("#{_cmd} log -1 --pretty=format:'%ae' #{tag}")
296296

297-
run_command("#{_cmd} config --local user.name '#{escape_quotes(author)}'")
298-
run_command("#{_cmd} config --local user.email '#{escape_quotes(email)}'")
297+
run_command("#{_cmd} config user.name '#{escape_quotes(author)}'")
298+
run_command("#{_cmd} config user.email '#{escape_quotes(email)}'")
299299

300300
cmd = ''
301301
cmd << "GIT_COMMITTER_DATE='#{escape_quotes(date)}' "
@@ -316,9 +316,9 @@ def fix_tags
316316
# If a line was read, then there was a config value so restore it.
317317
# Otherwise unset the value because originally there was none.
318318
if value.strip != ''
319-
run_command("#{_cmd} config --local #{name} '#{value.strip}'")
319+
run_command("#{_cmd} config #{name} '#{value.strip}'")
320320
else
321-
run_command("#{_cmd} config --local --unset #{name}")
321+
run_command("#{_cmd} config --unset #{name}")
322322
end
323323
end
324324
end

0 commit comments

Comments
 (0)