git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Chris Johnsen <chris_johnsen@pobox.com>,
	Miklos Vajna <vmiklos@frugalware.org>
Subject: Re: [PATCH/RFD] builtin-revert.c: release index lock when cherry-picking an empty commit
Date: Tue, 10 Mar 2009 14:17:30 -0400	[thread overview]
Message-ID: <20090310181730.GD26351@sigill.intra.peff.net> (raw)
In-Reply-To: <7v8wnflrws.fsf@gitster.siamese.dyndns.org>

On Sun, Mar 08, 2009 at 12:45:55PM -0700, Junio C Hamano wrote:

> If this part from your analysis is true for a shell:
> 
> > eval 'false
> >
> > '
> > echo status is $?
> >
> > generates:
> > ...
> >   status is 0
> 
> I would be very tempted to declare that shell is unfit for any serious
> use, not just for test suite.  Removing the empty line at the end of a
> scriptlet that such a broken shell misinterprets as an empty command
> that is equivalent to ":" (or "true") might hide breakages in the test
> suite, but
> 
>  (1) eval "$string" is used outside of test suite, most notably "am" and
>      "bisect".  I think "am"'s use is safe, but I wouldn't be surprised if
>      the scriptlet "bisect" internally creates has empty lines if only for
>      debuggability; and more importantly
> 
>  (2) who knows what _other_ things may be broken in such a shell?

OK, good points. I was just hoping not to cause people on FreeBSD undue
pain. What is the best way to make such a declaration? I can think of:

  1. A mention in the release notes.

  2. A test in the Makefile similar to the $(:) test.

  3. Getting in touch with the freebsd ports maintainer for git and
     suggesting a dependency on bash (and/or seeing if he wants to push
     through a fix for /bin/sh).

     I don't know if the same problem exists on other BSD-influenced systems,
     or how closely they share the ports collection (it's been quite a
     while since I've really admin'd a freebsd box). For that matter, I
     wonder if this is also a problem on OS X. Can somebody with an OS X
     box try:

       $ /bin/sh
       $ eval 'false

         '
       $ echo $?

     It should print '1'; if it prints '0', the shell is broken.

-Peff

  reply	other threads:[~2009-03-10 18:19 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-07  9:30 [PATCH/RFD] builtin-revert.c: release index lock when cherry-picking an empty commit Chris Johnsen
2009-03-07 11:15 ` Johannes Schindelin
2009-03-07 22:57   ` Chris Johnsen
2009-03-08  1:19     ` Johannes Schindelin
2009-03-08  4:14 ` Junio C Hamano
2009-03-08 21:09   ` Chris Johnsen
2009-03-08 21:53     ` Junio C Hamano
2009-03-08 14:42 ` Jeff King
2009-03-08 15:09   ` Jeff King
2009-03-08 19:45   ` Junio C Hamano
2009-03-10 18:17     ` Jeff King [this message]
2009-03-10 18:25       ` Tomas Carnecky
2009-03-10 19:33       ` Tomas Carnecky
2009-03-10 23:57       ` Chris Johnsen
2009-03-11  0:30         ` Jeff King
2009-03-11 11:08           ` Mike Ralphson
2009-03-11 17:02             ` Mike Ralphson
2009-03-22  9:41             ` Jeff King
2009-03-22 21:58               ` Junio C Hamano
2009-03-22 22:38                 ` Jeff King
2009-03-09 17:36   ` Brandon Casey

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=20090310181730.GD26351@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=chris_johnsen@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=vmiklos@frugalware.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 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).