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

[PATCH] t2202: make sure "git add" (no args) stays a no-op

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 20, 2013, 04:35 UTC
Message-ID
<7vvc45svas.fsf@alter.siamese.dyndns.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 t/t2202-add-addremove.sh | 10 ++++++++++
 1 file changed, 10 insertions(+)
diff --git a/t/t2202-add-addremove.sh b/t/t2202-add-addremove.sh
index 6a81510..fc8b59e 100755
--- a/t/t2202-add-addremove.sh
+++ b/t/t2202-add-addremove.sh
@@ -41,4 +41,14 @@ test_expect_success 'git add --all' '
 	test_cmp expect actual
 '
 
+test_expect_success 'Just "git add" is a no-op' '
+	git reset --hard &&
+	echo >will-remove &&
+	>will-not-be-added &&
+	git add &&
+	git diff-index --name-status --cached HEAD >actual &&
+	>expect &&
+	test_cmp expect actual
+'
+
 test_done
-- 
1.8.3.3-1028-g038de5b
Message 1 of 1 in “t2202: make sure "git add" (no args) stays a no-op”
  1. t2202: make sure "git add" (no args) stays a no-opJunio C Hamano, Jul 20, 2013

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.