Skip to content

Commit a74ba54

Browse files
author
Linus Torvalds
committed
Start using the partial tree reading in "git-diff-cache"
The reason I say "start using" is that we really should also limit the index checking by name - now we limit the tree object accesses by name, but we still check the whole index. Still, this should help.
1 parent 3e58763 commit a74ba54

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

diff-cache.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,12 +278,12 @@ int main(int argc, const char **argv)
278278
tree = read_object_with_reference(sha1, "tree", &size, NULL);
279279
if (!tree)
280280
die("bad tree object %s", tree_name);
281-
if (read_tree(tree, size, 1, NULL))
281+
if (read_tree(tree, size, 1, pathspec))
282282
die("unable to read tree object %s", tree_name);
283283

284284
ret = diff_cache(active_cache, active_nr);
285285

286-
diffcore_std(pathspec ? : NULL,
286+
diffcore_std(pathspec,
287287
detect_rename, diff_score_opt,
288288
pickaxe, pickaxe_opts,
289289
diff_break_opt,

0 commit comments

Comments
 (0)