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
@@ -234,7 +234,7 @@ static int list_paths(struct string_list *list, const char *with_tree,
|
||||
|
||||
if (ce->ce_flags & CE_UPDATE)
|
||||
continue;
|
||||
if (!match_pathspec_depth(pattern, ce->name, ce_namelen(ce), 0, m))
|
||||
if (!ce_path_match(ce, pattern, m))
|
||||
continue;
|
||||
item = string_list_insert(list, ce->name);
|
||||
if (ce_skip_worktree(ce))
|
||||
|
||||
Reference in New Issue
Block a user