# Re: \[PATCH 2/7\] commit-graph: fix ordering bug in generation numbers

- From: Junio C Hamano \<hidden\>
- Date: 2022-02-25 17:35:18 
- List: git
- Page: https://ratatoskr.run/git/2022/02/7931343
- Thread: https://ratatoskr.run/git/2022/02/7931343/t.md

```text
Derrick Stolee [ref] writes:

> It is very subtle, which is why it took me a while to debug this
> issue once I managed to trigger it.
>
>>     for each commit ctx->commits.list[i]:
>>         continue if generation number has been computed for it already
>
> This is the critical line in the current version. This includes
> "continue if the generation number was loaded from the previous
> commit-graph file." This means we under-count when building from
> an existing commit-graph with overflows.
>
> If we insert an increment here, then we risk double-counting. I
> should have described this better.

Ah, that obviously I missed.  Thanks.

```
