@@ -32,7 +32,7 @@ def run!
3232 ENV [ "LANGUAGE" ] = "en_US"
3333 log "LANGUAGE is: #{ ENV [ "LANGUAGE" ] } \n "
3434 end
35-
35+
3636 if @options [ :rebase ]
3737 get_branches
3838 elsif @options [ :rebasebranch ]
@@ -388,7 +388,7 @@ def fix_branches
388388 # Our --rebase option obviates the need for read-only tracked remotes, however. So, we'll
389389 # deprecate the old option, informing those relying on the old behavior that they should
390390 # use the newer --rebase otion.
391- if status =~ /Cannot setup tracking information/m
391+ if status =~ /fatal:.+' #{ branch } '.+/
392392 @cannot_setup_tracking_information = true
393393 run_command ( Svn2Git ::Migration . checkout_svn_branch ( branch ) )
394394 else
@@ -461,13 +461,17 @@ def run_command(cmd, exit_on_error=true, printout_output=false)
461461 # sub-process's stdin pipe.
462462 Thread . new do
463463 loop do
464- user_reply = @stdin_queue . pop
464+ begin
465+ user_reply = @stdin_queue . pop
465466
466- # nil is our cue to stop looping (pun intended).
467- break if user_reply . nil?
467+ # nil is our cue to stop looping (pun intended).
468+ break if user_reply . nil?
468469
469- stdin . puts user_reply
470- stdin . close
470+ stdin . puts user_reply
471+ stdin . close
472+ rescue IOError
473+ $stdout. print "No input requested.\n "
474+ end
471475 end
472476 end
473477
@@ -507,7 +511,7 @@ def git_config_command
507511 if @git_config_command . nil?
508512 status = run_command ( 'git config --local --get user.name' , false )
509513
510- @git_config_command = if status =~ /unknown option /m
514+ @git_config_command = if status =~ /error: .+ \s .+git config \[ .+ /m
511515 'git config'
512516 else
513517 'git config --local'
0 commit comments