Re: [GSoC PATCH v2] fsck: report the number of objects in the connectivity message
- From
- Aniket Gupta <aniketgupta3001@gmail.com>
- Date
- Nov 29, 2026, 19:33 UTC
- Message-ID
- <20261129193327.56928-1-aniketgupta3001@gmail.com>
- In-Reply-To
- <xmqqbj77h2sl.fsf@gitster.g>
Show 10 quoted lines
> Micronits. > > - "which is the number of buckets" is missing "the". > > - What holds the objects is not a "hash" but a "hashtable". > > - In an empty repository, we have no hash buckets, so the capacity > of the hashtable exactly matches the number of objects in that > case. "In a non-empty repository, the hashtable is larger than > what it holds" would be more accurate.
Will fix all in v3.
> A report on rebasing is incomplete without an explanation of the > reason why you had to rebase (what you wanted to achieve by > rebasing).
Apologies for missing that. In v1 the new tests were added at the end of t1450-fsck.sh. The test added by a9456705f1 (pack-check: fix bogus corruption report with core.bigFileThreshold, 2026-10-14) is now the last one there, so v1 no longer applied. I rebased to resolve that conflict myself.
> Another small change not mentioned in the proposed log message is to > report the number of objects using "%u".
Will be done in v3.
> Minor nit. "This is smaller than the value get_max_object_index() > returns when the object hashmap is not empty, as that counts ..."
Will change the comment.
> I wonder if you can just 'git add' a regular file in a freshly > created repository without committing to get the same effect?
Agreed. It prints "Checking connectivity (1 object)". Will use that in v3.
> The code is prepared to have up to 2 billion objects in an object > pool on 32-bit machines, as the type of the .nr_objs member [...] is > 'int' [...]. Something to think about later after the dust settles > (#leftoverbits).
Ack. I will check after this one.
> Optional cleanup with test_when_finished "rm -rf ..." would match > the test right above, though other tests in this file omit it too,
Will be done in v3.