git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/2] pack-format.txt: define "varint" format

From
MÅMartin Ågren <martin.agren@gmail.com>
Date
Dec 29, 2020, 22:41 UTC
Message-ID
<CAN0heSrEPt3=-uccGk2fKu=ScbE1Bq-cpsvisBcsoXdUC2sz5Q@mail.gmail.com>
In-Reply-To
<xmqqft3yltxo.fsf@gitster.c.googlers.com>
On Mon, 21 Dec 2020 at 22:40, Junio C Hamano <gitster@pobox.com> wrote:
Show 6 quoted lines
>
> Martin Ågren <martin.agren@gmail.com> 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.
Show 12 quoted lines
> 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
Previous: Junio C HamanoNext: Martin Ågren
Message 5 of 8 in “Documentation errors for HTTP protocol v2 and packfile”
  1. Ross LightDec 19, 2020
  2. 0/2 pack-format.txt: document lengths at start of delta dataMartin Ågren, Dec 21, 2020
  3. 1/2 pack-format.txt: define "varint" formatMartin Ågren, Dec 21, 2020
  4. Junio C HamanoDec 21, 2020
  5. Martin ÅgrenDec 29, 2020
  6. 2/2 pack-format.txt: document lengths at start of delta dataMartin Ågren, Dec 21, 2020
  7. Ross LightDec 23, 2020
  8. pack-format.txt: document sizes at start of delta dataMartin Ågren, Dec 29, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.