From: Michael J Gruber <git@drmicha.warpmail.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCHv2] git-config: Parse config files leniently
Date: Thu, 03 Sep 2009 09:41:49 +0200 [thread overview]
Message-ID: <4A9F733D.5050205@drmicha.warpmail.net> (raw)
In-Reply-To: <7vab1cfr6s.fsf@alter.siamese.dyndns.org>
Junio C Hamano venit, vidit, dixit 03.09.2009 09:00:
> Michael J Gruber <git@drmicha.warpmail.net> writes:
>
>> Currently, git config dies as soon as there is a parsing error. This is
>> especially unfortunate in case a user tries to correct config mistakes
>> using git config -e.
>>
>> 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 but
>> also everyone else.
>
> This changes the behaviour enough to break t3200-branch.sh, test #52.
>
> The test stuffs an invalid (but not syntactically incorrect) value used by
> "git branch" in the configuration and tries to make sure that "git branch"
> diagnoses the breakage, but it does not fail anymore with your patch.
>
> There are probably other breakages as well (e.g. t5304-prune.sh, test #5)
> but if you trace "git branch" under the debugger in the trash directory
> left after running t3200 with -i, it should be pretty obvious that your
> patch is utterly bogus. get_value() can return negative result after
> diagnosing a semantic problem with the value, and that is different from a
> syntax error that you would try to recover and continue, pretending you
> can ignore the remainder of the line as if it is a comment.
>
> Why was I CC'ed, if the patch wasn't even self tested?
Because
- not CC'ing you would have meant culling you from the existing CC,
- we've discussed v1 of this patch before,
- I asked in this patch (v2) whether to go for an alternative.
Since "git config -e" for broken config is not my itch at all, but the
reporter's, I'll stop my efforts after this response.
Michael
next prev parent reply other threads:[~2009-09-03 7:42 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-14 13:38 git config -> "fatal: bad config file" David Reitter
2009-08-14 14:18 ` Michael J Gruber
2009-08-14 14:26 ` David Reitter
2009-08-14 14:28 ` Jakub Narebski
2009-08-14 15:10 ` [PATCH] git-config: Parse config files leniently Michael J Gruber
2009-08-14 19:52 ` Junio C Hamano
2009-08-17 18:47 ` Michael J Gruber
2009-08-17 19:49 ` Junio C Hamano
2009-09-02 20:17 ` [PATCHv2] " Michael J Gruber
2009-09-03 7:00 ` Junio C Hamano
2009-09-03 7:41 ` Michael J Gruber [this message]
2009-09-03 23:42 ` Junio C Hamano
2009-09-04 7:13 ` Michael J Gruber
2009-09-04 8:40 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A9F733D.5050205@drmicha.warpmail.net \
--to=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).