git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] t6030: use $SHELL_PATH to invoke user's preferred shell instead of bare sh

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 30, 2011, 20:15 UTC
Message-ID
<7vfwki1wqo.fsf@alter.siamese.dyndns.org>
In-Reply-To
<Sn_8tnPB8FBe4C5QxoGkIRcdzJ2sLq_-h0oZ37fkrq42HJgWSlGgty_hMznS2ckiKKOg66yY7R2mRQqhJAzedr762dMKb_s6ELjELyGXyU-tkJzir-FnxhCkAIb3q1028d5FrBBy6EW3SXEPBMTYTw@cipher.nrlssc.navy.mil>
Brandon Casey <casey@nrlssc.navy.mil> writes:
Show 24 quoted lines
> From: Brandon Casey <drafnel@gmail.com>
>
> Some platforms (IRIX, Solaris) provide an ancient /bin/sh which chokes on
> modern shell syntax like $().  SHELL_PATH is provided to allow the user to
> specify a working sh, let's use it here.
>
> Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
> ---
>  t/t6030-bisect-porcelain.sh |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/t/t6030-bisect-porcelain.sh b/t/t6030-bisect-porcelain.sh
> index 62125ec..c53af62 100755
> --- a/t/t6030-bisect-porcelain.sh
> +++ b/t/t6030-bisect-porcelain.sh
> @@ -732,7 +732,7 @@ test_expect_success 'bisect: demonstrate identification of damage boundary' "
>  	git bisect reset &&
>  	git checkout broken &&
>  	git bisect start broken master --no-checkout &&
> -	git bisect run sh -c '
> +	git bisect run \"$SHELL_PATH\" -c '
>  		GOOD=\$(git for-each-ref \"--format=%(objectname)\" refs/bisect/good-*) &&
>  		git rev-list --objects BISECT_HEAD --not \$GOOD >tmp.\$\$ &&
>  		git pack-objects --stdout >/dev/null < tmp.\$\$

Hmm, shouldn't we also be quoting '$' in front of SHELL_PATH to make the test_expect_success interpolate the value of SHELL_PATH, instead of hoping that SHELL_PATH does not have double-quote in it when the shell that forms parameters given to test_expect_success interpolates it?

Previous: Brandon CaseyNext: Junio C Hamano
Message 2 of 4 in “t6030: use $SHELL_PATH to invoke user's preferred shell instead of bare sh”
  1. t6030: use $SHELL_PATH to invoke user's preferred shell instead of bare shBrandon Casey, Aug 29, 2011
  2. Junio C HamanoAug 30, 2011
  3. Junio C HamanoAug 30, 2011
  4. Brandon CaseyAug 30, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.