Git development
 help / color / mirror / Atom feed
From: Karthik R <karthikr@fastmail.fm>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] GIT_SSH does not override ssh in git-svn
Date: Mon, 17 Aug 2009 17:35:34 -0500	[thread overview]
Message-ID: <4A89DB36.6060508@fastmail.fm> (raw)
In-Reply-To: <7vhbw6qfuq.fsf@alter.siamese.dyndns.org>

Junio C Hamano wrote:
> Karthik R <karthikr@fastmail.fm> writes:
>
>   
>> +my $git_ssh_user_set = 1 if defined $ENV{GIT_SSH};
>> +if ($git_ssh_user_set) {
>> +       # If GIT_SSH is set, also set SVN_SSH...
>> +       $ENV{SVN_SSH} = $ENV{GIT_SSH};
>> +       # ... and escape \s in shell-variable on Windows
>> +       if ($^O eq 'MSWin32' || $^O eq 'msys') {
>> +               $ENV{SVN_SSH} =~ s/\\/\\\\/g;
>> +       }
>> +}
>> +
>>     
>
> Why not just
>
> 	if (defined $ENV{GIT_SSH}) {
>         	...
>
> ???
>
>   
>> $Git::SVN::Log::TZ = $ENV{TZ};
>> $ENV{TZ} = 'UTC';
>> $| = 1; # unbuffer STDOUT
>> -- 
>> 1.5.4.3
>>     
I think I had trouble getting that to work correctly on my Windows XP
box... I didn't dig into that (my perl was exactly 1 day old).

Does this look better (it does to me) ? If so, I can resend the patch
addressing Dscho's comments too.

+# 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};
+}
+

      reply	other threads:[~2009-08-17 22:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-17 21:09 [PATCH] GIT_SSH does not override ssh in git-svn Karthik R
2009-08-17 21:38 ` Johannes Schindelin
2009-08-17 21:40 ` Junio C Hamano
2009-08-17 22:35   ` Karthik R [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A89DB36.6060508@fastmail.fm \
    --to=karthikr@fastmail.fm \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox