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:
@ -365,7 +365,9 @@ static void do_traverse(struct traversal_context *ctx)
|
|||||||
* an uninteresting boundary commit may not have its tree
|
* an uninteresting boundary commit may not have its tree
|
||||||
* parsed yet, but we are not going to show them anyway
|
* 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);
|
struct tree *tree = get_commit_tree(commit);
|
||||||
tree->object.flags |= NOT_USER_GIVEN;
|
tree->object.flags |= NOT_USER_GIVEN;
|
||||||
add_pending_tree(ctx->revs, tree);
|
add_pending_tree(ctx->revs, tree);
|
||||||
|
|||||||
Reference in New Issue
Block a user