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
@ -11,6 +11,7 @@
|
||||
#include "unpack-trees.h"
|
||||
#include "refs.h"
|
||||
#include "submodule.h"
|
||||
#include "dir.h"
|
||||
|
||||
/*
|
||||
* diff-files
|
||||
@ -108,7 +109,7 @@ int run_diff_files(struct rev_info *revs, unsigned int option)
|
||||
if (diff_can_quit_early(&revs->diffopt))
|
||||
break;
|
||||
|
||||
if (!ce_path_match(ce, &revs->prune_data))
|
||||
if (!ce_path_match(ce, &revs->prune_data, NULL))
|
||||
continue;
|
||||
|
||||
if (ce_stage(ce)) {
|
||||
@ -438,7 +439,7 @@ static int oneway_diff(const struct cache_entry * const *src,
|
||||
if (tree == o->df_conflict_entry)
|
||||
tree = NULL;
|
||||
|
||||
if (ce_path_match(idx ? idx : tree, &revs->prune_data)) {
|
||||
if (ce_path_match(idx ? idx : tree, &revs->prune_data, NULL)) {
|
||||
do_oneway_diff(o, idx, tree);
|
||||
if (diff_can_quit_early(&revs->diffopt)) {
|
||||
o->exiting_early = 1;
|
||||
|
||||
Reference in New Issue
Block a user