Re: [PATCH v2 04/10] commit-graph: compute generation numbers

2018-04-11 Thread Stefan Beller
On Wed, Apr 11, 2018 at 6:02 AM, Derrick Stolee wrote: > On 4/10/2018 10:51 PM, Junio C Hamano wrote: >> >> Derrick Stolee writes: >> >>> + if ((*list)->generation != GENERATION_NUMBER_INFINITY) { >>> + if

Re: [PATCH v2 04/10] commit-graph: compute generation numbers

2018-04-11 Thread Eric Sunshine
On Wed, Apr 11, 2018 at 9:02 AM, Derrick Stolee wrote: > On 4/10/2018 10:51 PM, Junio C Hamano wrote: >> In case we want to do the "we know this is very large, but we do not >> know the exact value", we may actually want a mode where we can >> pretend that GENERATION_NUMBER_MAX

Re: [PATCH v2 04/10] commit-graph: compute generation numbers

2018-04-11 Thread Derrick Stolee
On 4/10/2018 10:51 PM, Junio C Hamano wrote: Derrick Stolee writes: + if ((*list)->generation != GENERATION_NUMBER_INFINITY) { + if ((*list)->generation > GENERATION_NUMBER_MAX) + die("generation number

Re: [PATCH v2 04/10] commit-graph: compute generation numbers

2018-04-10 Thread Junio C Hamano
Derrick Stolee writes: > + if ((*list)->generation != GENERATION_NUMBER_INFINITY) { > + if ((*list)->generation > GENERATION_NUMBER_MAX) > + die("generation number %u is too large to store > in commit-graph", > +

[PATCH v2 04/10] commit-graph: compute generation numbers

2018-04-09 Thread Derrick Stolee
While preparing commits to be written into a commit-graph file, compute the generation numbers using a depth-first strategy. The only commits that are walked in this depth-first search are those without a precomputed generation number. Thus, computation time will be relative to the number of new