From: Junio C Hamano <gitster@pobox.com>
To: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] guard config parser from value=NULL
Date: Sat, 09 Feb 2008 13:07:53 -0800 [thread overview]
Message-ID: <7vhcghet3q.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <12025767241532-git-send-email-mkoegler@auto.tuwien.ac.at> (Martin Koegler's message of "Sat, 9 Feb 2008 18:05:24 +0100")
Martin Koegler <mkoegler@auto.tuwien.ac.at> writes:
> @@ -416,7 +416,7 @@ int git_default_config(const char *var, const char *value)
> return 0;
> }
>
> - if (!strcmp(var, "user.name")) {
> + if (value && !strcmp(var, "user.name")) {
> strlcpy(git_default_name, value, sizeof(git_default_name));
> return 0;
> }
This is wrong, isn't it? When somebody says
[user]
name
we should not silently ignore it, but instead say "user.name is
not a bool!" and error out.
The same comment applies to all other
if (value && !strcmp(var, "<varname>"))
conversions.
next prev parent reply other threads:[~2008-02-09 21:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-09 17:05 [PATCH] guard config parser from value=NULL Martin Koegler
2008-02-09 21:07 ` Junio C Hamano [this message]
2008-02-10 17:08 ` Martin Koegler
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=7vhcghet3q.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=mkoegler@auto.tuwien.ac.at \
/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).