pathspec: convert some match_pathspec_depth() to ce_path_match()
This helps reduce the number of match_pathspec_depth() call sites and show how match_pathspec_depth() is used. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
017f804efc
commit
429bb40abd
@ -308,7 +308,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix)
|
||||
|
||||
for (i = 0; i < active_nr; i++) {
|
||||
const struct cache_entry *ce = active_cache[i];
|
||||
if (!match_pathspec_depth(&pathspec, ce->name, ce_namelen(ce), 0, seen))
|
||||
if (!ce_path_match(ce, &pathspec, seen))
|
||||
continue;
|
||||
ALLOC_GROW(list.entry, list.nr + 1, list.alloc);
|
||||
list.entry[list.nr].name = ce->name;
|
||||
|
Reference in New Issue
Block a user