From: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
To: git@vger.kernel.org
Cc: "Eric Sunshine" <sunshine@sunshineco.com>,
"Junio C Hamano" <gitster@pobox.com>,
"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: [PATCH 0/2] gitignore, re-inclusion fix
Date: Sun, 23 Aug 2015 19:50:12 +0700 [thread overview]
Message-ID: <1440334214-32131-1-git-send-email-pclouds@gmail.com> (raw)
This is an old problem. I attempted once [1] and then was reminded [2]
with some more comments on the original patch. Let's try again.
The problem is this .gitignore currently does not work, but it should:
/abc
!/abc/def/ghi
This patch fixes that by realizing that the last rule may re-include
something in abc/def so it does not exclude "abc" and "abc/def"
outright to give the last rule a chance to match.
[1] http://article.gmane.org/gmane.comp.version-control.git/259870
[2] http://thread.gmane.org/gmane.comp.version-control.git/265901/focus=266227
Nguyễn Thái Ngọc Duy (2):
dir.c: make last_exclude_matching_from_list() run til the end
dir.c: don't exclude whole dir prematurely if neg pattern may match
Documentation/gitignore.txt | 21 ++++++---
dir.c | 89 +++++++++++++++++++++++++++++++++++---
t/t3001-ls-files-others-exclude.sh | 20 +++++++++
3 files changed, 118 insertions(+), 12 deletions(-)
--
2.3.0.rc1.137.g477eb31
next reply other threads:[~2015-08-23 12:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-23 12:50 Nguyễn Thái Ngọc Duy [this message]
2015-08-23 12:50 ` [PATCH 1/2] dir.c: make last_exclude_matching_from_list() run til the end Nguyễn Thái Ngọc Duy
2015-08-25 20:28 ` Junio C Hamano
2015-08-31 10:13 ` Duy Nguyen
2015-08-23 12:50 ` [PATCH 2/2] dir.c: don't exclude whole dir prematurely if neg pattern may match Nguyễn Thái Ngọc Duy
2015-09-13 1:18 ` [PATCH v2 0/2] gitignore, re-inclusion fix Nguyễn Thái Ngọc Duy
2015-09-13 1:19 ` [PATCH v2 1/2] dir.c: make last_exclude_matching_from_list() run til the end Nguyễn Thái Ngọc Duy
2015-09-13 1:19 ` [PATCH v2 2/2] dir.c: don't exclude whole dir prematurely if neg pattern may match Nguyễn Thái Ngọc Duy
2015-09-14 17:15 ` Junio C Hamano
2015-09-17 13:21 ` Duy Nguyen
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=1440334214-32131-1-git-send-email-pclouds@gmail.com \
--to=pclouds@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=sunshine@sunshineco.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.