threads / patch / 20659

patch[resend 3] git-svn: Use GIT_SSH setting if SVN_SSH is not set

Subject: [PATCH][resend 3] git-svn: Use GIT_SSH setting if SVN_SSH is not set

## tl;dr

2 messages between Aug 18, 2009 and Aug 19, 2009. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Karthik R· Aug 18, 2009, 23:54 UTC · lore

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
Signed-off-by: Karthik Rajagopalan <karthikr@fastmail.fm>
---
Signed off this time.

Previous life of patch: [PATCH] GIT_SSH does not override ssh in git-svn [PATCH][resend] git-svn: Respect GIT_SSH setting

 git-svn.perl |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
Show changes to git-svn.perl +9 −0
diff --git a/git-svn.perl b/git-svn.perl
index b0bfb74..ef86d10 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
-- 
1.5.4.3
Eric Wong· Aug 19, 2009, 03:58 UTC · re: Karthik R · lore

Re: [PATCH][resend 3] git-svn: Use GIT_SSH setting if SVN_SSH is not set

Karthik R <karthikr@fastmail.fm> wrote:
Show 11 quoted lines
> 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
> 
> Signed-off-by: Karthik Rajagopalan <karthikr@fastmail.fm>
Thanks Karthik,

Acked and pushed out along with a few others I hadn't pushed to git://yhbt.net/git-svn

Eric Wong (1):
      svn: assume URLs from the command-line are URI-encoded
Karthik R (1):
      git-svn: Use GIT_SSH setting if SVN_SSH is not set
Tuomas Suutari (1):
      git-svn.txt: Fix location of parent argument
-- 
Eric Wong

← back to recent threads