protocol-v2.txt: align delim-pkt spec with usage

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>

Calvin Wan committed Nov 11, 2021 at 22:00 UTC 74db416c9c3bf829b0d0641e74c252bf53da0158
1 file changed +3 -3
Documentation/technical/protocol-v2.txt
+3 -3
@@ -116,11 +116,11 @@ command can be requested at a time.
116 empty-request = flush-pkt
117 command-request = command
118 capability-list
119 - [command-args]
119 + delim-pkt
120 + command-args
121 flush-pkt
122 command = PKT-LINE("command=" key LF)
122 - command-args = delim-pkt
123 - *command-specific-arg
123 + command-args = *command-specific-arg
124
125 command-specific-args are packet line framed arguments defined by
126 each individual command.