git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Kuleshov <kuleshovmail@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>,
	Alexander Kuleshov <kuleshovmail@gmail.com>
Subject: [PATCH 3/3 v2] t3700-add: added test for --exclude option
Date: Mon, 16 Mar 2015 01:07:08 +0600	[thread overview]
Message-ID: <1426446428-6279-1-git-send-email-kuleshovmail@gmail.com> (raw)
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

  parent reply	other threads:[~2015-03-15 19:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-15 19:06 [PATCH 1/3 v2] add: introduce new --exclude option Alexander Kuleshov
2015-03-15 19:06 ` [PATCH 2/3 v2] Documentation/git-add.txt: describe " Alexander Kuleshov
2015-03-16  0:36   ` Eric Sunshine
2015-03-15 19:07 ` Alexander Kuleshov [this message]
2015-03-16  0:35   ` [PATCH 3/3 v2] t3700-add: added test for " Eric Sunshine
2015-03-15 20:48 ` [PATCH 1/3 v2] add: introduce new " Philip Oakley
2015-03-16  0:56 ` Eric Sunshine

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1426446428-6279-1-git-send-email-kuleshovmail@gmail.com \
    --to=kuleshovmail@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).