[WIP RFC 1/5] Documentation: order protocol v2 sections
- Date: Mon, 3 Dec 2018 15:37:34 -0800
- From: Jonathan Tan <jonathantanmy@xxxxxxxxxx>
- Subject: [WIP RFC 1/5] Documentation: order protocol v2 sections
The git command line expects Git servers to follow a specific order of
sections when transmitting protocol v2 responses, but this is not
explicit in the documentation. Make the order explicit.
Signed-off-by: Jonathan Tan <jonathantanmy@xxxxxxxxxx>
Documentation/technical/protocol-v2.txt | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/Documentation/technical/protocol-v2.txt b/Documentation/technical/protocol-v2.txt
index 09e4e0273f..345c00e08c 100644
@@ -309,11 +309,11 @@ the 'wanted-refs' section in the server's response as explained below.
The response of `fetch` is broken into a number of sections separated by
delimiter packets (0001), with each section beginning with its section
+header. Most sections are sent only when the packfile is sent.
- output = *section
- section = (acknowledgments | shallow-info | wanted-refs | packfile)
- (flush-pkt | delim-pkt)
+ output = acknowledgements flush-pkt |
+ [acknowledgments delim-pkt] [shallow-info delim-pkt]
+ [wanted-refs delim-pkt] packfile flush-pkt
acknowledgments = PKT-LINE("acknowledgments" LF)
(nak | *ack)
@@ -335,9 +335,10 @@ header.
- * If the client determines that it is finished with negotiations
- by sending a "done" line, the acknowledgments sections MUST be
- omitted from the server's response.
+ * If the client determines that it is finished with negotiations by
+ sending a "done" line (thus requiring the server to send a packfile),
+ the acknowledgments sections MUST be omitted from the server's
* Always begins with the section header "acknowledgments"
@@ -388,9 +389,6 @@ header.
which the client has not indicated was shallow as a part of
- * This section is only included if a packfile section is also
- included in the response.
* This section is only included if the client has requested a
ref using a 'want-ref' line and if a packfile section is also