diff options
| author | Junio C Hamano <gitster@pobox.com> | 2014-02-27 14:01:15 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2014-02-27 14:01:15 -0800 |
| commit | cbaeafc3251d08b479c5eb735444bb6ad6210c93 (patch) | |
| tree | 5513bd0aab1246167f737639e72022c0de64b1a6 /diff-lib.c | |
| parent | Merge branch 'bk/refresh-missing-ok-in-merge-recursive' (diff) | |
| parent | clean: use cache_name_is_other() (diff) | |
| download | git-cbaeafc3251d08b479c5eb735444bb6ad6210c93.tar.gz git-cbaeafc3251d08b479c5eb735444bb6ad6210c93.zip | |
Merge branch 'nd/submodule-pathspec-ending-with-slash'
Allow "git cmd path/", when the 'path' is where a submodule is
bound to the top-level working tree, to match 'path', despite the
extra and unnecessary trailing slash.
* nd/submodule-pathspec-ending-with-slash:
clean: use cache_name_is_other()
clean: replace match_pathspec() with dir_path_match()
pathspec: pass directory indicator to match_pathspec_item()
match_pathspec: match pathspec "foo/" against directory "foo"
dir.c: prepare match_pathspec_item for taking more flags
pathspec: rename match_pathspec_depth() to match_pathspec()
pathspec: convert some match_pathspec_depth() to dir_path_match()
pathspec: convert some match_pathspec_depth() to ce_path_match()
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; |
