@@ -32,7 +32,7 @@ def run!
32
32
ENV [ "LANGUAGE" ] = "en_US"
33
33
log "LANGUAGE is: #{ ENV [ "LANGUAGE" ] } \n "
34
34
end
35
-
35
+
36
36
if @options [ :rebase ]
37
37
get_branches
38
38
elsif @options [ :rebasebranch ]
@@ -388,7 +388,7 @@ def fix_branches
388
388
# Our --rebase option obviates the need for read-only tracked remotes, however. So, we'll
389
389
# deprecate the old option, informing those relying on the old behavior that they should
390
390
# use the newer --rebase otion.
391
- if status =~ /Cannot setup tracking information/m
391
+ if status =~ /fatal:.+' #{ branch } '.+/
392
392
@cannot_setup_tracking_information = true
393
393
run_command ( Svn2Git ::Migration . checkout_svn_branch ( branch ) )
394
394
else
@@ -461,13 +461,17 @@ def run_command(cmd, exit_on_error=true, printout_output=false)
461
461
# sub-process's stdin pipe.
462
462
Thread . new do
463
463
loop do
464
- user_reply = @stdin_queue . pop
464
+ begin
465
+ user_reply = @stdin_queue . pop
465
466
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?
468
469
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
471
475
end
472
476
end
473
477
@@ -507,7 +511,7 @@ def git_config_command
507
511
if @git_config_command . nil?
508
512
status = run_command ( 'git config --local --get user.name' , false )
509
513
510
- @git_config_command = if status =~ /unknown option /m
514
+ @git_config_command = if status =~ /error: .+ \s .+git config \[ .+ /m
511
515
'git config'
512
516
else
513
517
'git config --local'
0 commit comments