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

Documentation errors for HTTP protocol v2 and packfile

From
RLRoss Light <ross@zombiezen.com>
Date
Dec 19, 2020, 17:07 UTC
Message-ID
<CAEs=z9Pajgjnq56+umA+g9-NFv-Rzo9m5sa-7cow_byckLiJ0A@mail.gmail.com>
Hello Git mailing list,

I'm working on a library to interoperate with the Git wire protocol. While doing so, I noticed two omissions in the documentation:

1. In the protocol-v2 doc [1], the HTTP example implies that the first
bytes in the response are "000eversion 2\n" when in fact they will be
PKT-LINE("# service=git-upload-pack" LF) followed by a flush packet,
then the version 2 data.
2. In the pack-format doc, the Deltified representation section [2]
describes the instruction sequence well, but neglects to mention the
two size varints [3] at the beginning of such an object.

I think it would be good to correct these documents for others attempting to work with Git internals. Let me know how I can help.

-Ross Light

[1]: https://github.com/git/git/blob/ae46588be0cd730430dded4491246dfb4eac5557/Documentation/technical/protocol-v2.txt#L72-L79 [2]: https://github.com/git/git/blob/ae46588be0cd730430dded4491246dfb4eac5557/Documentation/technical/pack-format.txt#L70-L76 [3]: https://github.com/git/git/blob/ae46588be0cd730430dded4491246dfb4eac5557/patch-delta.c#L29-L36

Next: Martin Ågren
Message 1 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.