Skip to content

Commit

Permalink
git-svn: Use GIT_SSH setting if SVN_SSH is not set
Browse files Browse the repository at this point in the history
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 <normalperson@yhbt.net>
Signed-off-by: Karthik Rajagopalan <karthikr@fastmail.fm>
  • Loading branch information
Karthik R authored and Eric Wong committed Aug 19, 2009
1 parent 5268f9e commit f3a87d9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions git-svn.perl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@
$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;
}
}
}

$Git::SVN::Log::TZ = $ENV{TZ};
$ENV{TZ} = 'UTC';
$| = 1; # unbuffer STDOUT
Expand Down

0 comments on commit f3a87d9

Please sign in to comment.