THIS IS A TEST INSTANCE ONLY! REPOSITORIES CAN BE DELETED AT ANY TIME!

Browse Source

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
tags/v2.24.0-rc0
Junio C Hamano 1 month ago
parent
commit
bbfe5f2241
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      list-objects.c

+ 3
- 1
list-objects.c View File

@@ -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…
Cancel
Save