git/list[1] front-page[2] threads[3] people[4] search[5] about
wed 2026-10-07 17:33 UTC

[GSoC PATCH 03/16] t6411: avoid suppressing git's exit code

From
Trieu Huynh <vikingtc4@gmail.com>
Date
Mar 28, 2026, 20:02 UTC
Message-ID
<20260328200255.247759-4-vikingtc4@gmail.com>
In-Reply-To
<20260328200255.247759-1-vikingtc4@gmail.com>

Update t6411-merge-filemode.sh to redirect git-cmds output to a temporary file instead of piping it directly to not hide the exit code of git commands behind pipes, as a crash in git might go unnoticed.

Signed-off-by: Trieu Huynh <vikingtc4@gmail.com>
---
 t/t6411-merge-filemode.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/t/t6411-merge-filemode.sh b/t/t6411-merge-filemode.sh
index 6ae2489286..9fe4271555 100755
--- a/t/t6411-merge-filemode.sh
+++ b/t/t6411-merge-filemode.sh
@@ -27,7 +27,8 @@ do_one_mode () {
 	test_expect_success "resolve single mode change ($strategy, $us)" '
 		git checkout -f $us &&
 		git merge -s $strategy $them &&
-		git ls-files -s file1 | grep ^100755
+		git ls-files -s file1 >actual &&
+		test_grep "^100755" actual
 	'
 
 	test_expect_success FILEMODE "verify executable bit on file ($strategy, $us)" '
@@ -65,7 +66,8 @@ do_both_modes () {
 		test_must_fail git merge -s $strategy b2 &&
 		git ls-files -u >actual &&
 		test_cmp expect actual &&
-		git ls-files -s file2 | grep ^100755
+		git ls-files -s file2 >actual &&
+		test_grep "^100755" actual
 	'
 
 	test_expect_success FILEMODE "verify executable bit on file ($strategy)" '
-- 
2.43.0
Previous: Trieu HuynhNext: Trieu Huynh
Message 4 of 24 in “Microproject: avoid suppressing git's exit code”
  1. 00/16 Microproject: avoid suppressing git's exit codeTrieu Huynh, Mar 28, 2026
  2. 01/16 t7004: avoid suppressing git's exit codeTrieu Huynh, Mar 28, 2026
  3. 02/16 t6423: avoid suppressing git's exit codeTrieu Huynh, Mar 28, 2026
  4. 03/16 t6411: avoid suppressing git's exit codeTrieu Huynh, Mar 28, 2026
  5. 04/16 t6101: avoid suppressing git's exit codeTrieu Huynh, Mar 28, 2026
  6. 05/16 t6006: avoid suppressing git's exit codeTrieu Huynh, Mar 28, 2026
  7. 06/16 t5304: avoid suppressing git's exit codeTrieu Huynh, Mar 28, 2026
  8. 07/16 t4153: avoid suppressing git's exit codeTrieu Huynh, Mar 28, 2026
  9. 08/16 t4150: avoid suppressing git's exit codeTrieu Huynh, Mar 28, 2026
  10. 09/16 t4140: avoid suppressing git's exit codeTrieu Huynh, Mar 28, 2026
  11. 10/16 t4039: avoid suppressing git's exit codeTrieu Huynh, Mar 28, 2026
  12. 11/16 t3903: avoid suppressing git's exit codeTrieu Huynh, Mar 28, 2026
  13. 12/16 t3701: avoid suppressing git's exit codeTrieu Huynh, Mar 28, 2026
  14. 13/16 t3412: avoid suppressing git's exit codeTrieu Huynh, Mar 28, 2026
  15. 14/16 t1400: avoid suppressing git's exit codeTrieu Huynh, Mar 28, 2026
  16. 15/16 t0100: avoid suppressing git's exit codeTrieu Huynh, Mar 28, 2026
  17. 16/16 t2206: avoid suppressing git's exit codeTrieu Huynh, Mar 28, 2026
  18. Junio C HamanoMar 29, 2026
  19. Trieu HuynhMar 29, 2026
  20. Tian YuchenMar 29, 2026
  21. Tian YuchenMar 29, 2026
  22. Karthik NayakMar 30, 2026
  23. Junio C HamanoMar 30, 2026
  24. Trieu HuynhMar 30, 2026

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.