Re: [PATCH] GIT_SSH does not override ssh in git-svn

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano wrote:
> Karthik R <karthikr@xxxxxxxxxxx> 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};
+}
+

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]