All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][resend] git-svn: Respect GIT_SSH setting
@ 2009-08-17 23:02 Karthik R
  2009-08-17 23:20 ` Johannes Schindelin
  2009-08-17 23:21 ` Junio C Hamano
  0 siblings, 2 replies; 8+ messages in thread
From: Karthik R @ 2009-08-17 23:02 UTC (permalink / raw)
  To: git

Setting GIT_SSH when using "git svn clone svn+ssh://..." does not
override the default ssh; SVN_SSH needed to be set instead. Fixed
this.

Also, on Windows, SVN_SSH needs to be set with \ escaped
  e.g., "C:\\PuTTY\\plink.exe"

See http://code.google.com/p/msysgit/issues/detail?id=305

Signed-off-by: Karthik R <karthikr@fastmail.fm>
---

Originally sent as [PATCH] GIT_SSH does not override ssh in git-svn

 git-svn.perl |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/git-svn.perl b/git-svn.perl
index b0bfb74..9bc1e71 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -21,6 +21,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 GIT_SSH is set, also set SVN_SSH...
+$ENV{SVN_SSH} = $ENV{GIT_SSH} if defined $ENV{GIT_SSH};
+# ... and escape \s in shell-variable on Windows
+if ($^O eq 'MSWin32' || $^O eq 'msys') {
+       $ENV{SVN_SSH} =~ s/\\/\\\\/g if defined $ENV{SVN_SSH};
+}
+
 $Git::SVN::Log::TZ = $ENV{TZ};
 $ENV{TZ} = 'UTC';
 $| = 1; # unbuffer STDOUT
-- 1.5.4.3

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-08-18 19:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-17 23:02 [PATCH][resend] git-svn: Respect GIT_SSH setting Karthik R
2009-08-17 23:20 ` Johannes Schindelin
2009-08-18  4:33   ` Karthik R
2009-08-18  9:52     ` Johannes Schindelin
2009-08-17 23:21 ` Junio C Hamano
2009-08-17 23:47   ` Karthik R
2009-08-18  5:48     ` Karthik R
2009-08-18 19:25     ` Junio C Hamano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.