Re: [PATCH 7/9] commit-graph: drop count_distinct_commits() function
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Dec 5, 2020, 02:26 UTC
- Message-ID
- <87sg8lxa1b.fsf@evledraar.gmail.com>
- In-Reply-To
- <X8qGTaIdnNa5mAfC@coredump.intra.peff.net>
On Fri, Dec 04 2020, Jeff King wrote:
Show 9 quoted lines
> When writing a commit graph, we collect a list of object ids in an > array, which we'll eventually copy into an array of "struct commit" > pointers. Before we do that, though, we count the number of distinct > commit entries. There's a subtle bug in this step, though. > [...] > - display_progress(ctx->progress, 0); /* TODO: Measure QSORT() progress */ > - QSORT(ctx->oids.list, ctx->oids.nr, oid_compare); > [...] > + QSORT(ctx->oids.list, ctx->oids.nr, oid_compare);
One thing your commit messag doesn't note is the removal of this TODO. Theoretically we still have the issue I noted in 890226ccb57 (commit-graph write: add itermediate progress, 2019-01-19), in practice I think it's fine to just forever remove this TODO.
I tried now on a really big repo and couldn't even get the progress bar you removed to appear, or the one you moved the QSORT() to.
Maybe I need to go even bigger, but more likely I overdid things a bit when I added all these progress bars to commit-graph.c at the time.