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

[PATCH 0/1] Fix broken test with zsh as /bin/sh

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Nov 27, 2019, 19:01 UTC
Message-ID
<20191127190142.64271-1-sandals@crustytoothpaste.net>

macOS Catalina provides zsh as one of the three options for /bin/sh (the other two being bash and dash). Therefore, it's possible that people will use zsh as /bin/sh and expect it to work when running Git and the testsuite.

There are two things required for this to happen. One is a patch to zsh to make it run all items in a pipeline in a subshell in sh mode, just as POSIX requires. I've sent a patch[0] upstream to make that happen; without that patch, multiple tests fail.

The other is this patch, which addresses a difference in behavior between bash and dash, which strip out NUL bytes from the output of a command substitution, and zsh, which does not. Both behaviors are permitted by POSIX, so this patch makes the test work in either case.

[0] https://www.zsh.org/mla/workers/2019/msg00960.html
brian m. carlson (1):
  t9001: avoid including non-trailing NUL bytes in variables
 t/t9001-send-email.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Next: brian m. carlson
Message 1 of 2 in “Fix broken test with zsh as /bin/sh”
  1. 0/1 Fix broken test with zsh as /bin/shbrian m. carlson, Nov 27, 2019
  2. 1/1 t9001: avoid including non-trailing NUL bytes in variablesbrian m. carlson, Nov 27, 2019

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.