diff --git a/lib/svn2git/migration.rb b/lib/svn2git/migration.rb index 4de8a9e..eb38338 100755 --- a/lib/svn2git/migration.rb +++ b/lib/svn2git/migration.rb @@ -357,7 +357,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 @@ -430,13 +430,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 @@ -476,7 +480,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' @@ -488,4 +492,3 @@ def git_config_command end end -