Re: [PATCH 07/20] show_objects_for_type(): convert to new revindex API
- From
Jeff King <peff@peff.net>
- Date
- Jan 12, 2021, 08:57 UTC
- Message-ID
- <X/1klwe44go+A+Xi@coredump.intra.peff.net>
- In-Reply-To
- <bc67bb462ae0c87b34e46568d54b170a8aec870b.1610129796.git.me@ttaylorr.com>
On Fri, Jan 08, 2021 at 01:17:09PM -0500, Taylor Blau wrote:
Show 12 quoted lines
> diff --git a/pack-bitmap.c b/pack-bitmap.c
> index d6861ddd4d..80c57bde73 100644
> --- a/pack-bitmap.c
> +++ b/pack-bitmap.c
> @@ -711,21 +711,22 @@ static void show_objects_for_type(
>
> for (offset = 0; offset < BITS_IN_EWORD; ++offset) {
> struct object_id oid;
> - struct revindex_entry *entry;
> - uint32_t hash = 0;
> + uint32_t hash = 0, n;
> + off_t ofs;A minor nit, but "n" isn't very descriptive. It's not in scope for very long, so that's not too bad, but there are two positions at work in this function: the pos/offset bit position, and the index position. Maybe "index_pos" would be better than "n" to keep the two clear?
-Peff