Skip to content

Commit f3a87d9

Browse files
Karthik REric Wong
authored andcommitted
git-svn: Use GIT_SSH setting if SVN_SSH is not set
If SVN_SSH is defined, it will be used. Else value in GIT_SSH is copied to SVN_SSH & then, only on Windows, the \s are escaped. On Windows, the shell-variables must be set as follows GIT_SSH="C:\Program Files\PuTTY\plink.exe" SVN_SSH="C:\\Program Files\\PuTTY\\plink.exe" See http://code.google.com/p/msysgit/issues/detail?id=305 [ew: fixed indentation to use tabs] Acked-by: Eric Wong <[email protected]> Signed-off-by: Karthik Rajagopalan <[email protected]>
1 parent 5268f9e commit f3a87d9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

git-svn.perl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@
2121
$Git::SVN::Ra::_log_window_size = 100;
2222
$Git::SVN::_minimize_url = 'unset';
2323

24+
if (! exists $ENV{SVN_SSH}) {
25+
if (exists $ENV{GIT_SSH}) {
26+
$ENV{SVN_SSH} = $ENV{GIT_SSH};
27+
if ($^O eq 'msys') {
28+
$ENV{SVN_SSH} =~ s/\\/\\\\/g;
29+
}
30+
}
31+
}
32+
2433
$Git::SVN::Log::TZ = $ENV{TZ};
2534
$ENV{TZ} = 'UTC';
2635
$| = 1; # unbuffer STDOUT

0 commit comments

Comments
 (0)