mirror of
https://github.com/git/git.git
synced 2024-11-18 22:14:34 +01:00
Merge branch 'jk/list-objects-optim-wo-trees'
The object traversal machinery has been optimized not to load tree objects when we are only interested in commit history. * jk/list-objects-optim-wo-trees: list-objects: don't queue root trees unless revs->tree_objects is set
This commit is contained in:
commit
bbfe5f2241
@ -365,7 +365,9 @@ static void do_traverse(struct traversal_context *ctx)
|
||||
* an uninteresting boundary commit may not have its tree
|
||||
* parsed yet, but we are not going to show them anyway
|
||||
*/
|
||||
if (get_commit_tree(commit)) {
|
||||
if (!ctx->revs->tree_objects)
|
||||
; /* do not bother loading tree */
|
||||
else if (get_commit_tree(commit)) {
|
||||
struct tree *tree = get_commit_tree(commit);
|
||||
tree->object.flags |= NOT_USER_GIVEN;
|
||||
add_pending_tree(ctx->revs, tree);
|
||||
|
Loading…
Reference in New Issue
Block a user