summaryrefslogtreecommitdiff
path: root/tree-walk.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-08-29 12:26:05 -0700
committerJunio C Hamano <gitster@pobox.com>2011-08-29 14:32:04 -0700
commit2842c0f914f7c05401c449db9d01276ac5a743f0 (patch)
tree2d9aa57534e62a6418fce3dc05ae09d4425a38a7 /tree-walk.h
parentf696543dad6c7ba27b0c4fab167a5687263a9ba0 (diff)
downloadgit-2842c0f914f7c05401c449db9d01276ac5a743f0.tar.gz
traverse_trees(): allow pruning with pathspec
The traverse_trees() machinery is primarily meant for merging two (or more) trees, and because a merge is a full tree operation, it doesn't support any pruning with pathspec. Since d1f2d7e (Make run_diff_index() use unpack_trees(), not read_tree(), 2008-01-19), however, we use unpack_trees() to traverse_trees() callchain to perform "diff-index", which could waste a lot of work traversing trees outside the user-supplied pathspec, only to discard at the blob comparison level in diff-lib.c::oneway_diff() which is way too late. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'tree-walk.h')
-rw-r--r--tree-walk.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tree-walk.h b/tree-walk.h
index 39524b7dba..0089581e1d 100644
--- a/tree-walk.h
+++ b/tree-walk.h
@@ -44,6 +44,7 @@ struct traverse_info {
struct traverse_info *prev;
struct name_entry name;
int pathlen;
+ struct pathspec *pathspec;
unsigned long conflicts;
traverse_callback_t fn;