Re: [PATCHv5] Add contrib/credentials/netrc with GPG support

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

 



On Tue, 05 Feb 2013 14:24:01 -0800 Junio C Hamano <gitster@xxxxxxxxx> wrote: 

JCH> Ted Zlatanov <tzz@xxxxxxxxxxxx> writes:
>> +		$f =~ s/([;<>\*\|`&\$!#\(\)\[\]\{\}:'"])/\\$1/g;

JCH> Yuck.  If you really have to quote, it is often far simpler to take
JCH> advantage of the fact that quoting rule for shell is much simpler
JCH> inside '', i.e.

JCH> 	sub sq {
JCH> 		my ($string) = @_;
JCH> 		$string =~ s|'|'\\''|g;
JCH> 		return "'$string'";
JCH> 	}

Oh, that's nice.  Thanks.  We don't need it anymore, but I'm sad to see
it go unused.

JCH> I think it is saner to do something like this instead here:
JCH> 				$mach = { machine => undef }

JCH> Otherwise your log_debug() will be filled by the tokens used for the
JCH> default entry, and also this "undef $mach" here will break your
JCH> macdef skipping logic if the default entry has a macdef, I think.

JCH> You can ignore an entry with undefined "machine" in the loop at the
JCH> end of load_netrc.

Cool, I merged your changes into PATCHv6.  I'll keep in mind about
merging the trailing else braces, too.  I forgot that setting for
cperl-mode (`cperl-merge-trailing-else . t').

Thanks
Ted

--
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]