]> git.ipfire.org Git - thirdparty/git.git/blobdiff - list-objects.c
Merge branch 'dd/notes-copy-default-dst-to-head'
[thirdparty/git.git] / list-objects.c
index 9307d91fb3fc8bee9cbeb1a6387b5d5bf92dbd4d..e19589baa045fe053d9bef285c78513b97f1f34c 100644 (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);