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

[PATCH 1/4] t7005: do not exit inside test.

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 23, 2007, 03:55 UTC
Message-ID
<1198382136-15724-1-git-send-email-gitster@pobox.com>

The way to signal failure is to leave non-zero in $?, not abort the entire test.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 t/t7005-editor.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/t/t7005-editor.sh b/t/t7005-editor.sh
index 44228b5..c1cec55 100755
--- a/t/t7005-editor.sh
+++ b/t/t7005-editor.sh
@@ -37,7 +37,7 @@ test_expect_success 'dumb should error out when falling back on vi' '
 	if git commit --amend
 	then
 		echo "Oops?"
-		exit 1
+		false
 	else
 		: happy
 	fi
-- 
1.5.4.rc1.19.g9151fa
Next: Junio C Hamano
Message 1 of 6 in “t7005: do not exit inside test.”
  1. 1/4 t7005: do not exit inside test.Junio C Hamano, Dec 23, 2007
  2. 2/4 builtin-commit: fix amending of the initial commitJunio C Hamano, Dec 23, 2007
  3. 3/4 builtin-commit: avoid double-negation in the code.Junio C Hamano, Dec 23, 2007
  4. 4/4 Allow selection of different cleanup modes for commit messagesJunio C Hamano, Dec 23, 2007
  5. Junio C HamanoDec 26, 2007
  6. Linus TorvaldsDec 27, 2007

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.