revision.h: introduce blob/tree walking in order of the commits
[gitweb.git] / list-objects.c
index 7c2ce9c4bd4c58b48772ddf56298a8e72b8630e3..4caa6fcb77c5601426792969ff0a1c02b3d18711 100644 (file)
@@ -239,6 +239,14 @@ void traverse_commit_list(struct rev_info *revs,
                if (commit->tree)
                        add_pending_tree(revs, commit->tree);
                show_commit(commit, data);
+
+               if (revs->tree_blobs_in_commit_order)
+                       /*
+                        * NEEDSWORK: Adding the tree and then flushing it here
+                        * needs a reallocation for each commit. Can we pass the
+                        * tree directory without allocation churn?
+                        */
+                       traverse_trees_and_blobs(revs, &csp, show_object, data);
        }
        traverse_trees_and_blobs(revs, &csp, show_object, data);