From: Nguyễn Thái Ngọc Duy Date: Thu, 10 Mar 2011 03:13:36 GMT Subject: [PATCH 2/5] match_pathspec_depth: support negative pathspec Message-ID: <1299726819-5576-3-git-send-email-pclouds@gmail.com> 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 --- 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