summaryrefslogtreecommitdiff
path: root/diff-lib.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2014-01-24 20:40:28 +0700
committerJunio C Hamano <gitster@pobox.com>2014-02-24 14:36:52 -0800
commit429bb40abdb5b42ffdde5b1a58f9a37da723d179 (patch)
tree62442107904393fa427b89bffc451dff3520c693 /diff-lib.c
parent017f804efc47234682fb0103a51ac453d96c56c1 (diff)
downloadgit-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.c5
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;