Re: [PATCH] git-config: Parse config files leniently

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

 



Michael J Gruber <git@xxxxxxxxxxxxxxxxxxxx> writes:


> Junio C Hamano venit, vidit, dixit 14.08.2009 21:52:
>> Michael J Gruber <git@xxxxxxxxxxxxxxxxxxxx> writes:
>> ...
>> But I may be being overly cautious.
>
> My first version had the lenient mode for "git config -e" only, which
> required a new global int (or, alternatively, changing all callers).

Without looking at the actual patch, that "single global that is only used
by builtin_config() when using -e" sounds safer.

But still I think I may be being overly cautious.

>> By the way, why did you have to change s/echo/printf/?  Can't you give two
>> lines in a single argument without "\n" escape?
>
> Because "printf" is more portable then "echo -e". At least I hope so ;)
> [ One could use a "here document", of course. Is that preferable? ]

What I meant was to give literally two lines, like this:

    check section.key 'warning: bad config file line 2 in .git/config
warning: bad config file line 2 in .git/config'

I do not see a need for a here-doc.

The rest is tangent you can ignore.

>>> Instead, issue a warning only and treat the rest of the line as a
>>> comment (ignore it). This benefits not only git config -e users.
>> 
>> ... a broken sentence in the middle?  I would have expected the "not only"
>> followed by "but also"; the question is "but also what?"
>
> I don't see any broken sentence here. "Benefit" is a verb as well as a noun.

Yes, and I think you read me correctly.

s/broken/chopped in the middle, missing 'but also X'/;

and you just explained that you meant "everyone else" by that X in the
missing part of the sentence.
--
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]