Skip to content

Commit

Permalink
There are two bugs filed at debian. This patches should fix them in a…
Browse files Browse the repository at this point in the history
  • Loading branch information
Corner, Bradley authored and sergiomb2 committed Oct 14, 2023
1 parent 3651330 commit d46f525
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions lib/svn2git/migration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def run!
ENV["LANGUAGE"]="en_US"
log "LANGUAGE is: #{ENV["LANGUAGE"]}\n"
end

if @options[:rebase]
get_branches
elsif @options[:rebasebranch]
Expand Down Expand Up @@ -388,7 +388,7 @@ def fix_branches
# Our --rebase option obviates the need for read-only tracked remotes, however. So, we'll
# deprecate the old option, informing those relying on the old behavior that they should
# use the newer --rebase otion.
if status =~ /Cannot setup tracking information/m
if status =~ /fatal:.+'#{branch}'.+/
@cannot_setup_tracking_information = true
run_command(Svn2Git::Migration.checkout_svn_branch(branch))
else
Expand Down Expand Up @@ -461,13 +461,17 @@ def run_command(cmd, exit_on_error=true, printout_output=false)
# sub-process's stdin pipe.
Thread.new do
loop do
user_reply = @stdin_queue.pop
begin
user_reply = @stdin_queue.pop

# nil is our cue to stop looping (pun intended).
break if user_reply.nil?
# nil is our cue to stop looping (pun intended).
break if user_reply.nil?

stdin.puts user_reply
stdin.close
stdin.puts user_reply
stdin.close
rescue IOError
$stdout.print "No input requested.\n"
end
end
end

Expand Down Expand Up @@ -507,7 +511,7 @@ def git_config_command
if @git_config_command.nil?
status = run_command('git config --local --get user.name', false)

@git_config_command = if status =~ /unknown option/m
@git_config_command = if status =~ /error: .+\s.+git config \[.+/m
'git config'
else
'git config --local'
Expand Down

0 comments on commit d46f525

Please sign in to comment.