diff options
author | Jeff King <peff@peff.net> | 2010-03-11 02:15:43 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-03-13 23:23:08 -0800 |
commit | 29209cbe58e7a977ae7267b11da19250b6878028 (patch) | |
tree | 9470bc7d55ace7fa7d876d8ff6ebee9e5edb053c /builtin/gc.c | |
parent | t0050: mark non-working test as such (diff) | |
download | tgif-29209cbe58e7a977ae7267b11da19250b6878028.tar.xz |
dir: fix COLLECT_IGNORED on excluded prefixes
As we walk the directory tree, if we see an ignored path, we
want to add it to the ignored list only if it matches any
pathspec that we were given. We used to check for the
pathspec to appear explicitly. E.g., if we see "subdir/file"
and it is excluded, we check to see if we have "subdir/file"
in our pathspec.
However, this interacts badly with the optimization to avoid
recursing into ignored subdirectories. If "subdir" as a
whole is ignored, then we never recurse, and consider only
whether "subdir" itself is in our pathspec. It would not
match a pathspec of "subdir/file" explicitly, even though it
is the reason that subdir/file would be excluded.
This manifests itself to the user as "git add subdir/file"
failing to correctly note that the pathspec was ignored.
This patch extends the in_pathspec logic to include prefix
directory case.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/gc.c')
0 files changed, 0 insertions, 0 deletions