Documentation errors for HTTP protocol v2 and packfile
- From
- Ross 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