From: Jeff King Date: Thu, 18 Jun 2026 16:07:43 GMT Subject: Re: [PATCH v5 2/2] graph: indent visual root in graph Message-ID: <20260618160743.GA821987@coredump.intra.peff.net> In-Reply-To: <20260618160504.GA818042@coredump.intra.peff.net> On Thu, Jun 18, 2026 at 12:05:05PM -0400, Jeff King wrote: > > From what I understood, we can only get the direct next commit, but no > > more reliably ordered. > > Right. There are other queue implementations that could allow full > in-order traversal (e.g., a binary tree), but our prio_queue does not. I > suspect performance for other cases would suffer if we switched the > underlying data structure. BTW, there's one extra trick here in the iteration: you might see commits in _both_ revs->commits and revs->commit_queue. So you'll have to iterate over both of them (and I guess push the loop body into a function to avoid duplication). We may eventually settle on having just one queue sturcture, but I think dd4bc01c0a used that to avoid disrupting existing callers. -Peff