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

Re: [PATCH 1/2] t/test-lib.sh: support Korn shell by converting GIT_EXIT_OK to GIT_EXIT_CODE

From
Ben Walton <bwalton@artsci.utoronto.ca>
Date
Oct 10, 2009, 12:53 UTC
Message-ID
<1255178966-sup-5813@ntdws12.chass.utoronto.ca>
In-Reply-To
<m2eipbphbr.fsf@igel.home>
Excerpts from Andreas Schwab's message of Sat Oct 10 08:24:40 -0400 2009:
> According to the autoconf docs this bug is also present in the Solaris
> /bin/sh (and autoconf generated scripts use some elaborated workaround).

Solaris' /bin/sh shouldn't be used for anything but forking a decent shell, imo. It was brought to my attention recently that the test suite for mercurial on solaris was failing the git tests. The mercurial folks initially thought this was a git on solaris bug.

After looking into it, I discovered that ^ is still treated[1] as a pipe symbol[2] in some cases. So, test suite programs run under /bin/sh on solaris with commands like `git reset --hard HEAD^` were misbehaving due to the shell setting up a pipeline under the right circumstances.

-Ben
[1] http://cvs.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/sh/cmd.c
    line 184
[2] This dates back to the Thomson shell:
    http://en.wikipedia.org/wiki/Thompson_shell
-- 
Ben Walton
Systems Programmer - CHASS
University of Toronto
C:416.407.5610 | W:416.978.4302

GPG Key Id: 8E89F6D2; Key Server: pgp.mit.edu
Contact me to arrange for a CAcert assurance meeting.
Previous: Andreas SchwabNext: Jeff King
Message 10 of 11 in “t/test-lib.sh: support Korn shell by converting GIT_EXIT_OK to GIT_EXIT_CODE”
  1. 1/2 t/test-lib.sh: support Korn shell by converting GIT_EXIT_OK to GIT_EXIT_CODEBrandon Casey, Oct 9, 2009
  2. 2/2 Makefile: use the native (Korn) shell on SunOS and IRIX/IRIX64Brandon Casey, Oct 9, 2009
  3. Jonathan NiederOct 9, 2009
  4. Jonathan NiederOct 9, 2009
  5. Junio C HamanoOct 9, 2009
  6. Brandon CaseyOct 9, 2009
  7. Junio C HamanoOct 10, 2009
  8. Clemens BuchacherOct 10, 2009
  9. Andreas SchwabOct 10, 2009
  10. Ben WaltonOct 10, 2009
  11. Jeff KingOct 10, 2009

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.