Re: [PATCH v2 06/19] midx: teach `nth_bitmapped_pack()` about incremental MIDXs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 17, 2024 at 05:12:13PM -0400, Taylor Blau wrote:

> In a similar fashion as in previous commits, teach the function
> `nth_bitmapped_pack()` about incremental MIDXs by translating the given
> `pack_int_id` from the concatenated lexical order to a MIDX-local
> lexical position.
> 
> When accessing the containing MIDX's array of packs, use the local pack
> ID. Likewise, when reading the 'BTMP' chunk, use the MIDX-local offset
> when accessing the data within that chunk.

OK, makes sense.

>  int nth_bitmapped_pack(struct repository *r, struct multi_pack_index *m,
>  		       struct bitmapped_pack *bp, uint32_t pack_int_id)
>  {
> +	uint32_t local_pack_int_id = midx_for_pack(&m, pack_int_id);
> +

Heh, after the last one reused the "n" variable, now we are back to a
separate local variable. Not wrong, but curious to go back and forth.

-Peff




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux