]> git.ipfire.org Git - thirdparty/git.git/commitdiff
protocol-v2.txt: align delim-pkt spec with usage
authorCalvin Wan <calvinwan@google.com>
Thu, 11 Nov 2021 22:00:48 +0000 (22:00 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 11 Nov 2021 22:53:18 +0000 (14:53 -0800)
The current protocol EBNF allows command-request to end with the
capability list, if no command specific arguments follow, but the
protocol requires that after the capability list, there must be a
delim-pkt regardless of the number of command specific arguments.  Fixed
the EBNF to match. Both JGit and libgit2's implementation has the
delim-pkt as mandatory. JGit's code is not publicly linkable, but
libgit2 is linked below[1]. As for currently implemented commands on v2
(ls-ref and fetch), the delim packet is already being passed through

[1]: https://github.com/libgit2/libgit2/blob/main/src/transports/git.c

Reported-by: Ivan Frade <ifrade@google.com>
Signed-off-by: Calvin Wan <calvinwan@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/technical/protocol-v2.txt

index 1040d853198b87ef913ed9157301965dd4a50cd9..a3ef7507b7263f8cb07f7e4e305f428ff112a743 100644 (file)
@@ -116,11 +116,11 @@ command can be requested at a time.
     empty-request = flush-pkt
     command-request = command
                      capability-list
-                     [command-args]
+                     delim-pkt
+                     command-args
                      flush-pkt
     command = PKT-LINE("command=" key LF)
-    command-args = delim-pkt
-                  *command-specific-arg
+    command-args = *command-specific-arg
 
     command-specific-args are packet line framed arguments defined by
     each individual command.