Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #284 and #259 #285

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions lib/svn2git/migration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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'
Expand All @@ -488,4 +492,3 @@ def git_config_command

end
end