Re: [PATCH v5 6/7] revision.c: generation-based topo-order algorithm
- From
Derrick Stolee <stolee@gmail.com>
- Date
- Nov 1, 2018, 16:12 UTC
- Message-ID
- <7ee1b2b4-b748-85d7-ab0f-4446a466d196@gmail.com>
- In-Reply-To
- <20181101154857.GW30222@szeder.dev>
On 11/1/2018 11:48 AM, SZEDER Gábor wrote:
Show 9 quoted lines
> On Thu, Nov 01, 2018 at 01:46:22PM +0000, Derrick Stolee wrote: >> 1. EXPLORE: using the explore_queue priority queue (ordered by >> maximizing the generation number) >> 2. INDEGREE: using the indegree_queue priority queue (ordered >> by maximizing the generation number) > Nit: I've been pondering for a while what exactly does "order by > maximizing ..." mean. Highest to lowest or lowest to highest? If I > understand the rest of the descriptions (that I snipped) correctly, > then it's the former, but I find that phrase in itself too ambiguous.
It means that our priority-queue "get" operation selects the item in the queue that is largest by our comparison function (first generation number, thencommit-date for ties).This means we walk commits that have high generation number before those with lower generation number, guaranteeing that we walk all children of a commit before walking that commit.
Thanks, -Stolee