threads / patch / 34498

patcht2202: make sure "git add" (no args) stays a no-op

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

## tl;dr

One message between Jul 20, 2013 and Jul 20, 2013. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Junio C Hamano· Jul 20, 2013, 04:35 UTC · lore
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 t/t2202-add-addremove.sh | 10 ++++++++++
 1 file changed, 10 insertions(+)
Show changes to t/t2202-add-addremove.sh +10 −0
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

← back to recent threads