All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Boyd <bebarino@gmail.com>
To: Ben Walton <bwalton@artsci.utoronto.ca>
Cc: gitster@pobox.com, git@vger.kernel.org
Subject: Re: [PATCH] ls-files: make option parser keep argv[0]
Date: Thu, 08 Oct 2009 13:32:50 -0700	[thread overview]
Message-ID: <4ACE4C72.4050400@gmail.com> (raw)
In-Reply-To: <1255011628-31841-1-git-send-email-bwalton@artsci.utoronto.ca>

Ben Walton wrote:
> The ls-files built-in was not asking the option parser to maintain
> argv[0].  This led to the possibility of fprintf(stderr, "...", NULL).
> On Solaris, this was causing a segfault.  On glibc systems, printed
> error messages didn't contain proper strings, but rather, "(null)":...
>
> A trigger for this bug was: `git ls-files -i`
>
> Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
>

Patch looks good.

Just a thought, maybe we should change the fprintf(stderr,...) and
exit(1) call to a die() and replace the argv[0] with "ls-files" similar
to the die() on line 546. Then your diffstat becomes -1 instead of 0.

  reply	other threads:[~2009-10-08 20:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-08 14:20 [PATCH] ls-files: make option parser keep argv[0] Ben Walton
2009-10-08 20:32 ` Stephen Boyd [this message]
2009-10-09  1:53   ` [PATCH] ls-files: die instead of fprintf/exit in -i error Ben Walton
2009-10-09  6:53     ` 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=4ACE4C72.4050400@gmail.com \
    --to=bebarino@gmail.com \
    --cc=bwalton@artsci.utoronto.ca \
    --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 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.