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
This commit is contained in:
Junio C Hamano
2011-10-05 12:35:53 -07:00
5 changed files with 38 additions and 6 deletions

View File

@ -468,6 +468,7 @@ static int diff_cache(struct rev_info *revs,
opts.unpack_data = revs;
opts.src_index = &the_index;
opts.dst_index = NULL;
opts.pathspec = &revs->diffopt.pathspec;
init_tree_desc(&t, tree->buffer, tree->size);
return unpack_trees(1, &t, &opts);