summaryrefslogtreecommitdiff
path: root/builtin/clean.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2020-04-29 16:15:30 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-04-29 16:15:31 -0700
commit6eacc39b6d2508b6a7522902330c29714c99f5f2 (patch)
treeeb45e53464fed0f3251b6e81d4ea39fc87df3e65 /builtin/clean.c
parentMerge branch 'en/sparse-checkout' (diff)
parentcompletion: fix 'git add' on paths under an untracked directory (diff)
downloadtgif-6eacc39b6d2508b6a7522902330c29714c99f5f2.tar.xz
Merge branch 'en/fill-directory-exponential'
The directory traversal code had redundant recursive calls which made its performance characteristics exponential with respect to the depth of the tree, which was corrected. * en/fill-directory-exponential: completion: fix 'git add' on paths under an untracked directory Fix error-prone fill_directory() API; make it only return matches dir: replace double pathspec matching with single in treat_directory() dir: include DIR_KEEP_UNTRACKED_CONTENTS handling in treat_directory() dir: replace exponential algorithm with a linear one dir: refactor treat_directory to clarify control flow dir: fix confusion based on variable tense dir: fix broken comment dir: consolidate treat_path() and treat_one_path() dir: fix simple typo in comment t3000: add more testcases testing a variety of ls-files issues t7063: more thorough status checking
Diffstat (limited to 'builtin/clean.c')
-rw-r--r--builtin/clean.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/builtin/clean.c b/builtin/clean.c
index c8c011d2dd..f14c21b863 100644
--- a/builtin/clean.c
+++ b/builtin/clean.c
@@ -983,12 +983,6 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
if (!cache_name_is_other(ent->name, ent->len))
continue;
- if (pathspec.nr)
- matches = dir_path_match(&the_index, ent, &pathspec, 0, NULL);
-
- if (pathspec.nr && !matches)
- continue;
-
if (lstat(ent->name, &st))
die_errno("Cannot lstat '%s'", ent->name);