Re: [PATCH v2 2/2] Documentation/gitformat-pack.txt: fix incorrect MIDX documentation
- From
Jeff King <peff@peff.net>
- Date
- Oct 31, 2023, 20:00 UTC
- Message-ID
- <20231031200041.GA877408@coredump.intra.peff.net>
- In-Reply-To
- <c149be35a1da66c5e1bbc1dd82839e32a52ace36.1698780244.git.me@ttaylorr.com>
On Tue, Oct 31, 2023 at 03:24:11PM -0400, Taylor Blau wrote:
Show 10 quoted lines
> Back in 32f3c541e3 (multi-pack-index: write pack names in chunk, > 2018-07-12) the MIDX's "Packfile Names" (or "PNAM", for short) chunk was > described as containing an array of string entries. e0d1bcf825 notes > that this is the only chunk in the MIDX format's specification that is > not guaranteed to be 4-byte aligned, and so should be placed last. > > This isn't quite accurate: the entries within the PNAM chunk are not > guaranteed to be 4-byte aligned since they are arbitrary strings, but > the chunk itself is 4-byte aligned since the ending is padded with NUL > bytes.
We also don't place it last! :) So the alignment is very important, as I found out in the recent chunk-corruption series.
> So these have always been externally aligned. Correct the corresponding > part of our documentation to reflect that.
Both this and the previous patch look good to me.
-Peff