From: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
To: git@vger.kernel.org
Cc: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: [PATCH 2/5] match_pathspec_depth: support negative pathspec
Date: Thu, 10 Mar 2011 10:13:36 +0700 [thread overview]
Message-ID: <1299726819-5576-3-git-send-email-pclouds@gmail.com> (raw)
In-Reply-To: <1299726819-5576-1-git-send-email-pclouds@gmail.com>
The return value of this function is bugging me, as well as seen[]
array. Not really sure how to do with them when a negative pathspec is
matched.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
dir.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/dir.c b/dir.c
index 168dad6..75c4a8f 100644
--- a/dir.c
+++ b/dir.c
@@ -279,6 +279,11 @@ int match_pathspec_depth(const struct pathspec *ps,
how = 0;
}
if (how) {
+ if (ps->items[i].to_exclude) {
+ if (seen && seen[i] < how)
+ seen[i] = how;
+ return 0;
+ }
if (retval < how)
retval = how;
if (seen && seen[i] < how)
--
1.7.3.1.256.g2539c.dirty
next prev parent reply other threads:[~2011-03-10 3:15 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-10 3:13 [WIP PATCH 0/5] support --exclude for diff/log commands Nguyễn Thái Ngọc Duy
2011-03-10 3:13 ` [PATCH 1/5] tree-walk: support negative pathspec Nguyễn Thái Ngọc Duy
2011-03-10 3:13 ` Nguyễn Thái Ngọc Duy [this message]
2011-03-10 3:13 ` [PATCH 3/5] revision.c: get rid of struct rev_info.prune_data Nguyễn Thái Ngọc Duy
2011-03-10 6:20 ` Junio C Hamano
2011-03-10 6:52 ` Nguyen Thai Ngoc Duy
2011-03-10 3:13 ` [PATCH 4/5] diff: refactor init/release API Nguyễn Thái Ngọc Duy
2011-03-10 3:13 ` [PATCH 5/5] diff: support --exclude Nguyễn Thái Ngọc Duy
2011-03-10 6:11 ` [WIP PATCH 0/5] support --exclude for diff/log commands Junio C Hamano
2011-03-10 7:03 ` Nguyen Thai Ngoc Duy
2011-03-10 8:41 ` Junio C Hamano
2011-03-10 10:05 ` Nguyen Thai Ngoc Duy
2011-03-21 4:02 ` Nguyen Thai Ngoc Duy
2011-03-21 9:45 ` Michael J Gruber
2011-03-21 10:02 ` Nguyen Thai Ngoc Duy
2011-03-22 23:59 ` Junio C Hamano
2011-03-23 12:10 ` Nguyen Thai Ngoc Duy
2011-03-23 12:18 ` Nguyen Thai Ngoc Duy
2011-03-23 12:51 ` Michael J Gruber
2011-03-23 13:34 ` Nguyen Thai Ngoc Duy
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=1299726819-5576-3-git-send-email-pclouds@gmail.com \
--to=pclouds@gmail.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.
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).