On Mon, 21 Dec 2020 at 22:40, Junio C Hamano <gitster@xxxxxxxxx> wrote: > > Martin Ågren <martin.agren@xxxxxxxxx> writes: > > > We define our varint format pretty much on the fly as we describe a pack > > file entry. In preparation for referring to it in more places in this > > document, define "varint" and refer to it. > We need to be careful when using a generic "varint" to mean the > older variant as it would confuse readers of OFS_DELTA section. > > ... goes and looks ... > > The phrase "offset encoding" is used in the document to talk about > OFS_DELTA offset. It is actually what the rest of the code thinks > is the canonical varint defined in varint.[ch]). > > A way to avoid confusion would be to refrain from using "varint" as > the primary way to describe this size field; instead explain it as > the "size encoding", to match "offset encoding" used for OFS_DELTA. Thank you very much for these comments. I will post a v2 soon, which will do exactly this: avoid "varint" in favor of "size encoding". > It may also help if we added to the description of "offset encoding" > that it is what other parts of the system consider the canonical > "varint" encoding. I will leave this as #leftoverbits, though. I'll "only" fix the omission reported by Ross. Martin