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

Hardcoded #!/bin/sh in t5532 causes problems on Solaris

From
Tom G. Christensen <tgc@jupiterrise.com>
Date
Apr 9, 2016, 20:27 UTC
Message-ID
<570965B9.9040207@jupiterrise.com>
Hello,
Looking at the testsuite results on Solaris I see a failure in t5532.3.
Running the testsuite with -v -i revealed a shell syntax error:

proxying for example.com 9418 ./proxy: syntax error at line 3: `cmd=$' unexpected not ok 3 - fetch through proxy works # # git fetch fake && # echo one >expect && # git log -1 --format=%s FETCH_HEAD >actual && # test_cmp expect actual #

Looking a t5532-fetch-proxy.sh the problem is obvious, it writes out a helper script which explicitly uses #!/bin/sh but fails to take into account that systems like Solaris has an ancient /bin/sh that knows nothing about POSIX things like $(). Replacing $() with `` was enough to make the test pass.

-tgc
Next: Jeff King
Message 1 of 14 in “Hardcoded #!/bin/sh in t5532 causes problems on Solaris”
  1. Tom G. ChristensenApr 9, 2016
  2. Jeff KingApr 9, 2016
  3. Tom G. ChristensenApr 9, 2016
  4. Jeff KingApr 9, 2016
  5. Junio C HamanoApr 10, 2016
  6. Junio C HamanoApr 10, 2016
  7. Eric SunshineApr 10, 2016
  8. Junio C HamanoApr 11, 2016
  9. Jeff KingApr 11, 2016
  10. Jeff KingApr 11, 2016
  11. Junio C HamanoApr 12, 2016
  12. Junio C HamanoApr 12, 2016
  13. Jeff KingApr 12, 2016
  14. Jeff KingApr 12, 2016

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.