From: Christian Couder <chriscool@tuxfamily.org>
To: Pierre Habouzit <madcoder@debian.org>
Cc: Junio Hamano <junkio@cox.net>,
Johannes Sixt <j.sixt@viscovery.net>,
Govind Salinas <blix@sophiasuchtig.com>,
Martin Koegler <mkoegler@auto.tuwien.ac.at>,
git@vger.kernel.org
Subject: Re: [PATCH] diff.c: guard config parser from value=NULL
Date: Mon, 11 Feb 2008 05:55:19 +0100 [thread overview]
Message-ID: <200802110555.19383.chriscool@tuxfamily.org> (raw)
In-Reply-To: <20080210190145.GB5129@artemis.madism.org>
Le dimanche 10 février 2008, Pierre Habouzit a écrit :
> On Sun, Feb 10, 2008 at 06:35:34PM +0000, Christian Couder wrote:
> > +static int xstrdup_confval(const char *dest, const char *var, const
> > char *value)
>
> Why not calling that "git_config_string" in config.[hc] and be
> API-consistent ?
In this function, there is:
if (!value || !*value)
return error("%s: lacks value", var);
but in some places an empty string is not an error, and in some other places
we "die" in case of error instead of using "return error..."
So I am not sure this function can be generally usefull as it is now.
Maybe I should add a flag parameter to control if we should "die" or "return
error" and if we should accept an empty string or not.
What do you think ?
Christian.
next prev parent reply other threads:[~2008-02-11 4:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-10 18:35 [PATCH] diff.c: guard config parser from value=NULL Christian Couder
2008-02-10 19:01 ` Pierre Habouzit
2008-02-11 4:55 ` Christian Couder [this message]
2008-02-10 21:13 ` 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=200802110555.19383.chriscool@tuxfamily.org \
--to=chriscool@tuxfamily.org \
--cc=blix@sophiasuchtig.com \
--cc=git@vger.kernel.org \
--cc=j.sixt@viscovery.net \
--cc=junkio@cox.net \
--cc=madcoder@debian.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).