summaryrefslogtreecommitdiff
path: root/unpack-trees.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-10-15 20:46:36 -0700
committerJunio C Hamano <gitster@pobox.com>2011-10-15 20:46:36 -0700
commitfc26f57b847b86ba330ea543a6dfc86a10d4cce3 (patch)
tree91e48380bbabaa47699db38c00c5c056d6ea48d2 /unpack-trees.c
parent57ded055c419183e43fd7841c1f9d2e774fa96e3 (diff)
parent2f88c19700feb8db8f116f94bf558e61c82d543c (diff)
downloadgit-fc26f57b847b86ba330ea543a6dfc86a10d4cce3.tar.gz
Merge branch 'jc/diff-index-unpack' into maint
* jc/diff-index-unpack: diff-index: pass pathspec down to unpack-trees machinery unpack-trees: allow pruning with pathspec traverse_trees(): allow pruning with pathspec
Diffstat (limited to 'unpack-trees.c')
-rw-r--r--unpack-trees.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/unpack-trees.c b/unpack-trees.c
index cc616c3f99..670b464738 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -444,6 +444,7 @@ static int traverse_trees_recursive(int n, unsigned long dirmask,
newinfo = *info;
newinfo.prev = info;
+ newinfo.pathspec = info->pathspec;
newinfo.name = *p;
newinfo.pathlen += tree_entry_len(p->path, p->sha1) + 1;
newinfo.conflicts |= df_conflicts;
@@ -1040,6 +1041,7 @@ int unpack_trees(unsigned len, struct tree_desc *t, struct unpack_trees_options
info.fn = unpack_callback;
info.data = o;
info.show_all_errors = o->show_all_errors;
+ info.pathspec = o->pathspec;
if (o->prefix) {
/*