diff --git a/git-svn.perl b/git-svn.perl index a0410f0554..3b33379473 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -22,14 +22,13 @@ $Git::SVN::default_ref_id = $ENV{GIT_SVN_ID} || 'git-svn'; $Git::SVN::Ra::_log_window_size = 100; $Git::SVN::_minimize_url = 'unset'; -if (! exists $ENV{SVN_SSH}) { - if (exists $ENV{GIT_SSH}) { - $ENV{SVN_SSH} = $ENV{GIT_SSH}; - if ($^O eq 'msys') { - $ENV{SVN_SSH} =~ s/\\/\\\\/g; - $ENV{SVN_SSH} =~ s/(.*)/"$1"/; - } - } +if (! exists $ENV{SVN_SSH} && exists $ENV{GIT_SSH}) { + $ENV{SVN_SSH} = $ENV{GIT_SSH}; +} + +if (exists $ENV{SVN_SSH} && $^O eq 'msys') { + $ENV{SVN_SSH} =~ s/\\/\\\\/g; + $ENV{SVN_SSH} =~ s/(.*)/"$1"/; } $Git::SVN::Log::TZ = $ENV{TZ}; diff --git a/t/t9901-git-web--browse.sh b/t/t9901-git-web--browse.sh index 7906e5d032..1185b42246 100755 --- a/t/t9901-git-web--browse.sh +++ b/t/t9901-git-web--browse.sh @@ -12,7 +12,7 @@ test_expect_success \ echo http://example.com/foo\&bar >expect && git config browser.custom.cmd echo && git web--browse --browser=custom \ - http://example.com/foo\&bar >actual && + http://example.com/foo\&bar | tr -d "\r" >actual && test_cmp expect actual ' @@ -21,7 +21,7 @@ test_expect_success \ echo http://example.com/foo\;bar >expect && git config browser.custom.cmd echo && git web--browse --browser=custom \ - http://example.com/foo\;bar >actual && + http://example.com/foo\;bar | tr -d "\r" >actual && test_cmp expect actual ' @@ -30,7 +30,7 @@ test_expect_success \ echo http://example.com/foo#bar >expect && git config browser.custom.cmd echo && git web--browse --browser=custom \ - http://example.com/foo#bar >actual && + http://example.com/foo#bar | tr -d "\r" >actual && test_cmp expect actual ' @@ -44,7 +44,7 @@ test_expect_success \ chmod +x "fake browser" && git config browser.w3m.path "`pwd`/fake browser" && git web--browse --browser=w3m \ - http://example.com/foo >actual && + http://example.com/foo | tr -d "\r" >actual && test_cmp expect actual ' @@ -59,7 +59,7 @@ test_expect_success \ } f" && git web--browse --browser=custom \ - http://example.com/foo >actual && + http://example.com/foo | tr -d "\r" >actual && test_cmp expect actual '