diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-02-27 21:17:36 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-02-27 21:17:36 -0800 |
commit | d5c87a802d3b0bcd37b38d117648f342e7ad62d2 (patch) | |
tree | 531cdac203249d777d555209dadab103a16925a5 /diff-lib.c | |
parent | e5ea66f9e545588c92cf228cca16f0b52d467bb5 (diff) | |
parent | f577b92fe75643228674c0dcb2a4747587cf541d (diff) | |
download | git-d5c87a802d3b0bcd37b38d117648f342e7ad62d2.tar.gz |
Merge branch 'nd/struct-pathspec'
* nd/struct-pathspec: (22 commits)
t6004: add pathspec globbing test for log family
t7810: overlapping pathspecs and depth limit
grep: drop pathspec_matches() in favor of tree_entry_interesting()
grep: use writable strbuf from caller for grep_tree()
grep: use match_pathspec_depth() for cache/worktree grepping
grep: convert to use struct pathspec
Convert ce_path_match() to use match_pathspec_depth()
Convert ce_path_match() to use struct pathspec
struct rev_info: convert prune_data to struct pathspec
pathspec: add match_pathspec_depth()
tree_entry_interesting(): optimize wildcard matching when base is matched
tree_entry_interesting(): support wildcard matching
tree_entry_interesting(): fix depth limit with overlapping pathspecs
tree_entry_interesting(): support depth limit
tree_entry_interesting(): refactor into separate smaller functions
diff-tree: convert base+baselen to writable strbuf
glossary: define pathspec
Move tree_entry_interesting() to tree-walk.c and export it
tree_entry_interesting(): remove dependency on struct diff_options
Convert struct diff_options to use struct pathspec
...
Diffstat (limited to 'diff-lib.c')
-rw-r--r-- | diff-lib.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/diff-lib.c b/diff-lib.c index 392ce2bef0..1e22992cb1 100644 --- a/diff-lib.c +++ b/diff-lib.c @@ -106,7 +106,7 @@ int run_diff_files(struct rev_info *revs, unsigned int option) DIFF_OPT_TST(&revs->diffopt, HAS_CHANGES)) break; - if (!ce_path_match(ce, revs->prune_data)) + if (!ce_path_match(ce, &revs->prune_data)) continue; if (ce_stage(ce)) { @@ -427,7 +427,7 @@ static int oneway_diff(struct cache_entry **src, struct unpack_trees_options *o) 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)) do_oneway_diff(o, idx, tree); return 0; @@ -501,7 +501,7 @@ int do_diff_cache(const unsigned char *tree_sha1, struct diff_options *opt) active_nr = dst - active_cache; init_revisions(&revs, NULL); - revs.prune_data = opt->paths; + init_pathspec(&revs.prune_data, opt->pathspec.raw); tree = parse_tree_indirect(tree_sha1); if (!tree) die("bad tree object %s", sha1_to_hex(tree_sha1)); |