Re: [PATCH v2 05/24] Documentation: describe MIDX-based bitmaps
- From
Jeff King <peff@peff.net>
- Date
- Jul 21, 2021, 10:18 UTC
- Message-ID
- <YPf0hivipY6o5Y3B@coredump.intra.peff.net>
- In-Reply-To
- <64a260e0c6a116b7c6fa6fea2b9fd96bf416cb18.1624314293.git.me@ttaylorr.com>
On Mon, Jun 21, 2021 at 06:25:10PM -0400, Taylor Blau wrote:
Show 19 quoted lines
> +An object is uniquely described by its bit position within a bitmap: > + > + - If the bitmap belongs to a packfile, the __n__th bit corresponds to > + the __n__th object in pack order. For a function `offset` which maps > + objects to their byte offset within a pack, pack order is defined as > + follows: > + > + o1 <= o2 <==> offset(o1) <= offset(o2) > + > + - If the bitmap belongs to a MIDX, the __n__th bit corresponds to the > + __n__th object in MIDX order. With an additional function `pack` which > + maps objects to the pack they were selected from by the MIDX, MIDX order > + is defined as follows: > + > + o1 <= o2 <==> pack(o1) <= pack(o2) /\ offset(o1) <= offset(o2) > + > + The ordering between packs is done lexicographically by the pack name, > + with the exception of the preferred pack, which sorts ahead of all other > + packs.
This doesn't render well as asciidoc (the final paragraph is taken as more of the code block). But that is a problem through the whole file. I think we should ignore it for now, and worry about asciidoc-ifying the whole thing later, if we choose to.
> + The ordering between packs is done lexicographically by the pack name, > + with the exception of the preferred pack, which sorts ahead of all other > + packs.
Hmm, I'm not sure if this "lexicographically" part is true. Really we're building on the midx .rev format here. And that says "defined by the MIDX's pack list" (though I can't offhand remember if that is lexicographic, or if it is in the reverse-mtime order).
At any rate, should we just be referencing the rev documentation?
> [...]
The rest of the changes to the document seemed quite sensible to me.
-Peff