On Tue, 14 Nov 2017 16:30:39 -0800 Stefan Beller <sbeller@xxxxxxxxxx> wrote: > The change in list-objects.c is rather minimal as we'll be re-using > the infrastructure put in place of the revision walking machinery. For > example one could expect that add_pending_tree is not called, but rather > commit->tree is directly passed to the tree traversal function. This > however requires a lot more code than just emptying the queue containing > trees after each commit. Ah, I see. You're calling add_pending_tree(), then traverse_trees_and_blobs() will immediately flush the list of pending trees. I'm not sure that passing commit->tree directly to the tree traversal function will require a lot more code, but even if it does, you should at least add a NEEDSWORK - currently, flushing the list of pending trees frees the array containing the list of pending trees, so each invocation will need to reallocate a new array.