git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: Git List <git@vger.kernel.org>
Subject: Re: [PATCH] t/test-lib.sh: do not trust $SHELL
Date: Fri, 21 Sep 2012 17:12:17 -0400	[thread overview]
Message-ID: <20120921211217.GA24134@sigill.intra.peff.net> (raw)
In-Reply-To: <CALkWK0kRzN_yQZ1JqJogBs6Z1nLhofBijHzeWR5YfQYHOtpaBA@mail.gmail.com>

On Sat, Sep 22, 2012 at 02:37:38AM +0530, Ramkumar Ramachandra wrote:

> > I don't think that is the right thing to do. The point of SHELL is to
> > point at a bourne-compatible shell. On some systems, the main reason to
> > set it is that /bin/sh is _broken_, and we are trying to avoid it.
> 
> But you're only avoiding it in the --tee/ --va* codepath.  In the
> normal codepath, you're stuck with /bin/sh anyway.

No, the #!-header is only information. When you run "make test" we
actually invoke the shell ourselves using $SHELL_PATH.

> > A bigger question is: why are you setting SHELL=zsh in the first place?
> 
> I use ZSH as my primary shell, so SHELL is set to zsh when I run
> tests.  How can we trust $SHELL to be a bourne-compatible shell?

Ah, my fault. I was thinking we overrode $SHELL along with $SHELL_PATH,
but we do not.

The correct patch is to stop using $SHELL, but not to switch to a manual
/bin/sh. It should use $SHELL_PATH instead, which is how you tell git
your path to a sane bourne shell.

-Peff

  reply	other threads:[~2012-09-21 21:12 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-17 17:01 How do I run tests under Valgrind? Ramkumar Ramachandra
2012-09-17 17:20 ` Jeff King
2012-09-17 17:23   ` Ramkumar Ramachandra
2012-09-17 17:35     ` Jeff King
2012-09-17 17:39       ` Ramkumar Ramachandra
2012-09-17 17:44         ` Jeff King
2012-09-17 17:55           ` Johannes Sixt
2012-09-17 17:57             ` Jeff King
2012-09-17 18:28           ` Ramkumar Ramachandra
     [not found]           ` <CALkWK0mkBbY7dUyaZAqqKE3ZMfE_xU6em_KCOKM9nsTjUP-9pA@mail.gmail.com>
2012-09-17 18:29             ` Jeff King
2012-09-21 19:31               ` Ramkumar Ramachandra
2012-09-21 19:58                 ` Ramkumar Ramachandra
2012-09-21 20:13                   ` Stefano Lattarini
2012-09-21 20:17                     ` Ramkumar Ramachandra
2012-09-21 20:46                       ` Ramkumar Ramachandra
2012-09-21 20:49                     ` Jeff King
2012-09-22 13:03                       ` Stefano Lattarini
2012-09-22 17:47                         ` Jeff King
2012-09-22 18:20                           ` Stefano Lattarini
2012-09-22 20:24                           ` Junio C Hamano
2012-09-21 20:52                     ` [PATCH] t/test-lib.sh: do not trust $SHELL Ramkumar Ramachandra
2012-09-21 20:58                       ` Jeff King
2012-09-21 21:07                         ` Ramkumar Ramachandra
2012-09-21 21:12                           ` Jeff King [this message]
2012-09-21 21:34                             ` Ramkumar Ramachandra
2012-09-21 21:57                               ` Andreas Schwab
2012-09-21 22:30                                 ` Junio C Hamano
2012-09-22  4:26                                   ` Ramkumar Ramachandra
2012-09-22  4:52                                     ` Junio C Hamano
2012-09-22  4:54                                       ` Ramkumar Ramachandra
2012-09-22  4:57                                         ` Ramkumar Ramachandra
2012-09-22 20:16                                           ` Junio C Hamano
2012-09-26  3:49                                             ` Ramkumar Ramachandra
2012-09-21 21:59                               ` Junio C Hamano
2012-09-21 22:15                               ` Jeff King
2012-09-21 21:08                         ` Andreas Schwab
2012-09-21 21:13                           ` Jeff King

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=20120921211217.GA24134@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=artagnon@gmail.com \
    --cc=git@vger.kernel.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).