From: Stephen Haberman <stephen@exigencecorp.com>
To: git@vger.kernel.org
Subject: Re: [PATCH] test overlapping ignore patterns
Date: Thu, 7 Jul 2011 11:12:52 -0700 (PDT) [thread overview]
Message-ID: <1310062372893-6559395.post@n2.nabble.com> (raw)
In-Reply-To: <1229620278-25152-1-git-send-email-git@drmicha.warpmail.net>
> Add a test which checks that negated patterns such as "!foo.html" can
> override previous patterns such as "*.html". This is documented
> behaviour but had not been tested so far.
Negated excludes with a pattern does not seem to work with sub directories,
e.g. the following test fails for me.
The file /one/two/a.1 exists, and is initially excluded by *, but not
re-included by "!*.1" (where as /a.1 is re-included).
diff --git i/t/t3001-ls-files-others-exclude.sh
w/t/t3001-ls-files-others-exclude.sh
index c8fe978..e6c86ff 100755
--- i/t/t3001-ls-files-others-exclude.sh
+++ w/t/t3001-ls-files-others-exclude.sh
@@ -175,6 +175,12 @@ test_expect_success 'negated exclude matches can
override previous ones' '
grep "^a.1" output
'
+test_expect_success 'negated exclude matches can override previous ones 2'
'
+
+ git ls-files --others --exclude="*" --exclude="!*.1" >output &&
+ grep "^one/two/a.1" output
+'
+
(Replying to this old thread via nabble; hopefully it works.)
- Stephen
--
View this message in context: http://git.661346.n2.nabble.com/git-ignore-tp1665336p6559395.html
Sent from the git mailing list archive at Nabble.com.
next prev parent reply other threads:[~2011-07-07 18:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-16 22:43 git ignore Max Power
2008-12-16 22:53 ` Linus Torvalds
2008-12-16 23:08 ` Junio C Hamano
2008-12-18 17:11 ` [PATCH] test overlapping ignore patterns Michael J Gruber
2011-07-07 18:12 ` Stephen Haberman [this message]
2011-07-08 18:01 ` Junio C Hamano
2011-07-08 18:39 ` Stephen Haberman
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1310062372893-6559395.post@n2.nabble.com \
--to=stephen@exigencecorp.com \
--cc=git@vger.kernel.org \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).