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

[PATCH 3/3 v2] t3700-add: added test for --exclude option

From
Alexander Kuleshov <kuleshovmail@gmail.com>
Date
Mar 15, 2015, 19:07 UTC
Message-ID
<1426446428-6279-1-git-send-email-kuleshovmail@gmail.com>
In-Reply-To
<1426446383-5264-1-git-send-email-kuleshovmail@gmail.com>
Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
---
 t/t3700-add.sh | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
diff --git a/t/t3700-add.sh b/t/t3700-add.sh
index f7ff1f5..6f71c67 100755
--- a/t/t3700-add.sh
+++ b/t/t3700-add.sh
@@ -332,4 +332,22 @@ test_expect_success 'git add --dry-run --ignore-missing of non-existing file out
 	test_i18ncmp expect.err actual.err
 '
 
+test_expect_success 'Test that "git add --exclude" works' '
+	>foo &&
+	>bar &&
+	git add --exclude=bar . &&
+	! (git ls-files | grep bar)
+	(git ls-files | grep foo)
+'
+
+test_expect_success 'Test multiply --exclude' '
+	>foo &&
+	>bar &&
+	>"b a z" &&
+	git add --exclude="bar" --exclude="b a z" . &&
+	(git ls-files | grep foo)
+	! (git ls-files | grep "b a z")
+	! (git ls-files | grep "baz")
+'
+
 test_done
-- 
2.3.3.472.g20ceeac.dirty
Previous: Eric SunshineNext: Eric Sunshine
Message 4 of 7 in “add: introduce new --exclude option”
  1. 1/3 add: introduce new --exclude optionAlexander Kuleshov, Mar 15, 2015
  2. 2/3 Documentation/git-add.txt: describe --exclude optionAlexander Kuleshov, Mar 15, 2015
  3. Eric SunshineMar 16, 2015
  4. 3/3 t3700-add: added test for --exclude optionAlexander Kuleshov, Mar 15, 2015
  5. Eric SunshineMar 16, 2015
  6. Philip OakleyMar 15, 2015
  7. Eric SunshineMar 16, 2015

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.