From: Junio C Hamano <gitster@pobox.com>
To: Christian Couder <chriscool@tuxfamily.org>
Cc: Johannes Sixt <j.sixt@viscovery.net>,
Pierre Habouzit <madcoder@debian.org>,
Git ML <git@vger.kernel.org>
Subject: Re: [bug] generic issue with git_config handlers
Date: Mon, 04 Feb 2008 16:03:34 -0800 [thread overview]
Message-ID: <7vk5lki815.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <200802050013.20335.chriscool@tuxfamily.org> (Christian Couder's message of "Tue, 5 Feb 2008 00:13:20 +0100")
Christian Couder <chriscool@tuxfamily.org> writes:
> Very unfortunate.
>
> I finally had the following patch that passed all tests (it changed only one
> test), in case someone wants to suggest that we change git_config_bool,
> hint, hint!
Sorry, I do not get what you are hinting at. The fact that you
passed all the tests suggests that we have a gap in the test
coverage for these two, so you are inviting more tests from
others?
> diff --git a/config.c b/config.c
> index 526a3f4..a2c7214 100644
> --- a/config.c
> +++ b/config.c
> @@ -131,7 +131,7 @@ static int get_value(config_fn_t fn, char *name,
> unsigned in
> while (c == ' ' || c == '\t')
> c = get_next_char();
>
> - value = NULL;
> + value = "";
> if (c != '\n') {
> if (c != '=')
> return -1;
As long as you have this, I do not think you can avoid breaking
existing repositories that have:
[core]
autocrlf
filemode =
and expect git to say "Ah, core.autocrlf is set to true, and
filemode is not trustable, so I need to do a MS-DOG".
$ git config --bool core.autocrlf
true
$ git config --bool core.filemode
false
Your "builtin-config.c" patch looks better than before (which
would segfault), but I think
$ git config --bool --list
could pay attention to the "type" thing set earlier, just like
show_config() does.
next prev parent reply other threads:[~2008-02-05 0:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-31 9:16 [bug] generic issue with git_config handlers Pierre Habouzit
2008-01-31 9:25 ` Junio C Hamano
2008-01-31 10:10 ` Pierre Habouzit
2008-02-04 6:27 ` Christian Couder
2008-02-04 17:01 ` Johannes Sixt
2008-02-04 23:13 ` Christian Couder
2008-02-05 0:03 ` Junio C Hamano [this message]
2008-02-07 5:45 ` Christian Couder
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=7vk5lki815.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=chriscool@tuxfamily.org \
--cc=git@vger.kernel.org \
--cc=j.sixt@viscovery.net \
--cc=madcoder@debian.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.