git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH][resend] git-svn: Respect GIT_SSH setting

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Aug 18, 2009, 09:52 UTC
Message-ID
<alpine.DEB.1.00.0908181150090.4680@intel-tinevez-2-302>
In-Reply-To
<4A8A2EFE.6000203@fastmail.fm>
Hi,
On Mon, 17 Aug 2009, Karthik R wrote:
Show 12 quoted lines
> Johannes Schindelin wrote:
>
> > On Mon, 17 Aug 2009, Karthik R wrote:
> >
> > > Setting GIT_SSH when using "git svn clone svn+ssh://..." does not 
> > > override the default ssh; SVN_SSH needed to be set instead.
> >
> > This is now in past tense, no?
>
> Yes... this is all in the past tense now :) ... should be "did not 
> override the default ssh". I'll fix it if I have to resend the patch for 
> a different reason.
Show 29 quoted lines
> > > 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};
> > > +}
> > >     
> >
> > This is a change from before... I do not know if it is a good one, as 
> > SVN_SSH could be defined differently by the user, no?  In that case, 
> > the user was most likely using the correct amount of backslashes...
>
> Dscho, The *correct* amount of backslashes is 1 (per dir) - same as used 
> with GIT_SSH. If the user has set SVN_SSH but not GIT_SSH (most likely 
> without escaping \), then fixing up SVN_SSH for use with git-svn is not 
> a bad thing.
> 
> I did this change to retain existing behavior (using SVN_SSH to 
> override) even when user doesn't know the \\ quirk - or if the user has 
> set it for some other non-msys version of svn.

Two things: you want to say that much in the commit message, lest people as stupid as me fall into the same trap. And you might want to avoid doing that for MSWin32: we may have a MinGW Perl in the near future (Bosko was working really hard on that), and then we do _not_ want that behavior, right?

Ciao, Dscho

Previous: Karthik RNext: Junio C Hamano
Message 4 of 8 in “[resend] git-svn: Respect GIT_SSH setting”
  1. [resend] git-svn: Respect GIT_SSH settingKarthik R, Aug 17, 2009
  2. Johannes SchindelinAug 17, 2009
  3. Karthik RAug 18, 2009
  4. Johannes SchindelinAug 18, 2009
  5. Junio C HamanoAug 17, 2009
  6. Karthik RAug 17, 2009
  7. Karthik RAug 18, 2009
  8. Junio C HamanoAug 18, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.