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

Re* git-remote SEGV on t5505 test.

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 18, 2008, 06:18 UTC
Message-ID
<7vsku7d8ak.fsf_-_@gitster.siamese.dyndns.org>
In-Reply-To
<48802DCD.2090704@posdata.co.kr>
SungHyun Nam <namsh@posdata.co.kr> writes:
>     Is it possible that we can use 'SHELL_PATH' here?

It is not just possible but we really should. There are other test scripts that use hardcoded /bin/sh, but by setting SHELL_PATH the user is already telling us that what the vendor has in /bin/sh isn't adequately POSIX enough, and we really should try to honor that.

"git grep -n /bin/sh t/t*sh | grep -v ':1:#!'" would tell you which ones are suspect.

---
 t/t9001-send-email.sh |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index de5b980..1c857cf 100755
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
@@ -13,7 +13,7 @@ test_expect_success \
 
 test_expect_success \
     'Setup helper tool' \
-    '(echo "#!/bin/sh"
+    '(echo "#!$SHELL_PATH"
       echo shift
       echo output=1
       echo "while test -f commandline\$output; do output=\$((\$output+1)); done"
@@ -138,7 +138,7 @@ test_expect_success 'Valid In-Reply-To when prompting' '
 '
 
 test_expect_success 'setup fake editor' '
-	(echo "#!/bin/sh" &&
+	(echo "#!$SHELL_PATH" &&
 	 echo "echo fake edit >>\"\$1\""
 	) >fake-editor &&
 	chmod +x fake-editor
@@ -235,7 +235,7 @@ test_expect_success 'sendemail.cc unset' '
 
 test_expect_success '--compose adds MIME for utf8 body' '
 	clean_fake_sendmail &&
-	(echo "#!/bin/sh" &&
+	(echo "#!$SHELL_PATH" &&
 	 echo "echo utf8 body: àéìöú >>\"\$1\""
 	) >fake-editor-utf8 &&
 	chmod +x fake-editor-utf8 &&
@@ -254,7 +254,7 @@ test_expect_success '--compose adds MIME for utf8 body' '
 
 test_expect_success '--compose respects user mime type' '
 	clean_fake_sendmail &&
-	(echo "#!/bin/sh" &&
+	(echo "#!$SHELL_PATH" &&
 	 echo "(echo MIME-Version: 1.0"
 	 echo " echo Content-Type: text/plain\\; charset=iso-8859-1"
 	 echo " echo Content-Transfer-Encoding: 8bit"
Previous: SungHyun NamNext: Junio C Hamano
Message 4 of 7 in “git-remote SEGV on t5505 test.”
  1. SungHyun NamJul 18, 2008
  2. Junio C HamanoJul 18, 2008
  3. SungHyun NamJul 18, 2008
  4. Re* git-remote SEGV on t5505 test.Junio C Hamano, Jul 18, 2008
  5. Junio C HamanoJul 18, 2008
  6. SungHyun NamJul 18, 2008
  7. Junio C HamanoJul 18, 2008

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.