diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2014-01-24 20:40:28 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-02-24 14:36:52 -0800 |
commit | 429bb40abdb5b42ffdde5b1a58f9a37da723d179 (patch) | |
tree | 62442107904393fa427b89bffc451dff3520c693 /diff-lib.c | |
parent | 017f804efc47234682fb0103a51ac453d96c56c1 (diff) | |
download | git-429bb40abdb5b42ffdde5b1a58f9a37da723d179.tar.gz |
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>
Diffstat (limited to 'diff-lib.c')
-rw-r--r-- | diff-lib.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/diff-lib.c b/diff-lib.c index 346cac651d..2eddc66bbd 100644 --- a/diff-lib.c +++ b/diff-lib.c @@ -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; |