On Tue, 05 Feb 2013 14:24:01 -0800 Junio C Hamano <gits...@pobox.com> wrote: 

JCH> Ted Zlatanov <t...@lifelogs.com> 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').


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

Reply via email to