path: root/Documentation/technical/protocol-v2.txt
diff options
authorJunio C Hamano <>2018-07-24 21:50:44 (GMT)
committerJunio C Hamano <>2018-07-24 21:50:44 (GMT)
commit88df0fa6597fd32b0394c544fb37d6655bd34a13 (patch)
tree994bc28a9b8fc27ca1cf2460a8377c79e737d9f6 /Documentation/technical/protocol-v2.txt
parent43013305887c2b81858a0741f39872f8ed5f27d6 (diff)
parentcf1e7c07705eb21c30d0ee414810e7bc8fdf7d82 (diff)
Merge branch 'jt/connectivity-check-after-unshallow'
"git fetch" failed to correctly validate the set of objects it received when making a shallow history deeper, which has been corrected. * jt/connectivity-check-after-unshallow: fetch-pack: write shallow, then check connectivity fetch-pack: implement ref-in-want fetch-pack: put shallow info in output parameter fetch: refactor to make function args narrower fetch: refactor fetch_refs into two functions fetch: refactor the population of peer ref OIDs upload-pack: test negotiation with changing repository upload-pack: implement ref-in-want test-pkt-line: add unpack-sideband subcommand
Diffstat (limited to 'Documentation/technical/protocol-v2.txt')
1 files changed, 27 insertions, 1 deletions
diff --git a/Documentation/technical/protocol-v2.txt b/Documentation/technical/protocol-v2.txt
index f58f24b..09e4e02 100644
--- a/Documentation/technical/protocol-v2.txt
+++ b/Documentation/technical/protocol-v2.txt
@@ -298,12 +298,21 @@ included in the client's request:
for use with partial clone and partial fetch operations. See
`rev-list` for possible "filter-spec" values.
+If the 'ref-in-want' feature is advertised, the following argument can
+be included in the client's request as well as the potential addition of
+the 'wanted-refs' section in the server's response as explained below.
+ want-ref <ref>
+ Indicates to the server that the client wants to retrieve a
+ particular ref, where <ref> is the full name of a ref on the
+ server.
The response of `fetch` is broken into a number of sections separated by
delimiter packets (0001), with each section beginning with its section
output = *section
- section = (acknowledgments | shallow-info | packfile)
+ section = (acknowledgments | shallow-info | wanted-refs | packfile)
(flush-pkt | delim-pkt)
acknowledgments = PKT-LINE("acknowledgments" LF)
@@ -318,6 +327,10 @@ header.
shallow = "shallow" SP obj-id
unshallow = "unshallow" SP obj-id
+ wanted-refs = PKT-LINE("wanted-refs" LF)
+ *PKT-LINE(wanted-ref LF)
+ wanted-ref = obj-id SP refname
packfile = PKT-LINE("packfile" LF)
*PKT-LINE(%x01-03 *%x00-ff)
@@ -378,6 +391,19 @@ header.
* This section is only included if a packfile section is also
included in the response.
+ wanted-refs section
+ * This section is only included if the client has requested a
+ ref using a 'want-ref' line and if a packfile section is also
+ included in the response.
+ * Always begins with the section header "wanted-refs".
+ * The server will send a ref listing ("<oid> <refname>") for
+ each reference requested using 'want-ref' lines.
+ * The server MUST NOT send any refs which were not requested
+ using 'want-ref' lines.
packfile section
* This section is only included if the client has sent 'want'
lines in its request and either requested that no more