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

From: Ted Zlatanov <[email-masked]>
Date: Tue, 05 Feb 2013 19:34:00 -0500

On Tue, 05 Feb 2013 14:24:01 -0800 Junio C Hamano <[email-masked]> wrote: 

JCH> Ted Zlatanov <[email-masked]> 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