pathspec: convert some match_pathspec_depth() to dir_path_match()
This helps reduce the number of match_pathspec_depth() call sites and show how m_p_d() is used. And it usage is: - match against an index entry (ce_path_match or match_pathspec_depth in ls-files) - match against a dir_entry from read_directory (dir_path_match and match_pathspec_depth in clean.c, which will be converted later) - resolve-undo (rerere.c and ls-files.c) 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
429bb40abd
commit
ebb32893ba
@ -208,8 +208,7 @@ static char *prune_directory(struct dir_struct *dir, struct pathspec *pathspec,
|
||||
i = dir->nr;
|
||||
while (--i >= 0) {
|
||||
struct dir_entry *entry = *src++;
|
||||
if (match_pathspec_depth(pathspec, entry->name, entry->len,
|
||||
prefix, seen))
|
||||
if (dir_path_match(entry, pathspec, prefix, seen))
|
||||
*dst++ = entry;
|
||||
else if (flag & WARN_IMPLICIT_DOT)
|
||||
/*
|
||||
|
Reference in New Issue
Block a user