git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Couder <chriscool@tuxfamily.org>
To: "Govind Salinas" <govind@sophiasuchtig.com>
Cc: "Junio C Hamano" <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [Janitors] value could be NULL in config parser
Date: Sat, 9 Feb 2008 06:41:19 +0100	[thread overview]
Message-ID: <200802090641.20171.chriscool@tuxfamily.org> (raw)
In-Reply-To: <5d46db230802081720x122a807do6c63b6b3e435b4c5@mail.gmail.com>

Le samedi 9 février 2008, Govind Salinas a écrit :
> On 2/8/08, Junio C Hamano <gitster@pobox.com> wrote:
> > If you want to fix them (you do not have to do all of them, and
> > if you would like to help, please make one patch per function
> > fixed), the procedure is:
>
> I think I got all the erroneous ones.  I did
>
> find . -name "*.c" | xargs grep git_config\( | awk '{ idx = index($2,
> ")"); p = substr($2, 12, idx - 12); print  p }' | sort | uniq -u
>
> To try and get a list of all the ones that might need updating. 

Thanks.

> I did 
> notice that most functions never check value for null, but they don't
> directly access them.  They pass them off to other methods.  As far as
> I can tell, some of these methods don't validate the NULL.  So they
> will need to be updated.
>
> Question.  Wouldn't it reduce the amount of validation we have to do
> if whoever is calling back checked null and assigned an empty string?
> If so, we can probably replace all these patches with one patch.

This was discussed in this thread:

http://thread.gmane.org/gmane.comp.version-control.git/72107/

In short we can't do that now, but it may be possible latter, if we first 
deprecate using an empty string as boolean value "false" (while a NULL is 
boolean value "true").

Christian.

  reply	other threads:[~2008-02-09  5:35 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-08  6:43 [Janitors] value could be NULL in config parser Junio C Hamano
2008-02-08 14:26 ` [PATCH] archive-tar.c: guard config parser from value=NULL Miklos Vajna
2008-02-08 14:26 ` [PATCH] builtin-gc.c: " Miklos Vajna
2008-02-08 14:26 ` [PATCH] remote.c: " Miklos Vajna
2008-02-08 16:34   ` Michele Ballabio
2008-02-08 14:27 ` [PATCH] setup.c: " Miklos Vajna
2008-02-08 16:34   ` Michele Ballabio
2008-02-08 21:29     ` Miklos Vajna
2008-02-08 17:07 ` [Janitors] value could be NULL in config parser Govind Salinas
2008-02-09  1:20 ` Govind Salinas
2008-02-09  5:41   ` Christian Couder [this message]
2008-02-09  6:04     ` Junio C Hamano
2008-02-09 10:18   ` Christian Couder
2008-02-09 13:15     ` Christian Couder
2008-02-09 20:11       ` Govind Salinas

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=200802090641.20171.chriscool@tuxfamily.org \
    --to=chriscool@tuxfamily.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=govind@sophiasuchtig.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).