summaryrefslogtreecommitdiff
path: root/unpack-trees.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-10-05 19:35:53 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-10-05 19:35:53 (GMT)
commit1b840a56629c8c0620c261672cc5d4d35ba253fa (patch)
tree38691399a0fc7bb3bc5eac7f5e8b80dadbad573a /unpack-trees.c
parent2c4610393195cc6f35ea79efadbc5c7fd7470891 (diff)
parent2f88c19700feb8db8f116f94bf558e61c82d543c (diff)
downloadgit-1b840a56629c8c0620c261672cc5d4d35ba253fa.zip
git-1b840a56629c8c0620c261672cc5d4d35ba253fa.tar.gz
git-1b840a56629c8c0620c261672cc5d4d35ba253fa.tar.bz2
Merge branch 'jc/diff-index-unpack'
* 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 cc616c3..670b464 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) {
/*