summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarthik R <karthikr@fastmail.fm>2009-08-18 23:54:40 (GMT)
committerEric Wong <normalperson@yhbt.net>2009-08-19 03:51:32 (GMT)
commitf3a87d922a0333a56b5a912440aa324883019d81 (patch)
tree07dad854634895bf239e1b37f3c32fd63b448db2
parent5268f9edc3c86b07a64fcc2679e5ffe39be28d97 (diff)
downloadgit-f3a87d922a0333a56b5a912440aa324883019d81.zip
git-f3a87d922a0333a56b5a912440aa324883019d81.tar.gz
git-f3a87d922a0333a56b5a912440aa324883019d81.tar.bz2
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 <normalperson@yhbt.net> Signed-off-by: Karthik Rajagopalan <karthikr@fastmail.fm>
-rwxr-xr-xgit-svn.perl9
1 files changed, 9 insertions, 0 deletions
diff --git a/git-svn.perl b/git-svn.perl
index 5515e3e..ce4fef9 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -21,6 +21,15 @@ $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;
+ }
+ }
+}
+
$Git::SVN::Log::TZ = $ENV{TZ};
$ENV{TZ} = 'UTC';
$| = 1; # unbuffer STDOUT