summaryrefslogtreecommitdiff
path: root/Documentation/technical/protocol-v2.txt
diff options
context:
space:
mode:
authorCalvin Wan <calvinwan@google.com>2021-11-11 22:00:48 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-11-11 22:53:18 (GMT)
commit74db416c9c3bf829b0d0641e74c252bf53da0158 (patch)
treee97083e08cfb015cdb8c3ccf478f85b751f0b404 /Documentation/technical/protocol-v2.txt
parent5fbd2fc5997dfa4d4593a862fe729b1e7a89bcf8 (diff)
downloadgit-74db416c9c3bf829b0d0641e74c252bf53da0158.zip
git-74db416c9c3bf829b0d0641e74c252bf53da0158.tar.gz
git-74db416c9c3bf829b0d0641e74c252bf53da0158.tar.bz2
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>
Diffstat (limited to 'Documentation/technical/protocol-v2.txt')
-rw-r--r--Documentation/technical/protocol-v2.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/Documentation/technical/protocol-v2.txt b/Documentation/technical/protocol-v2.txt
index 1040d85..a3ef750 100644
--- a/Documentation/technical/protocol-v2.txt
+++ b/Documentation/technical/protocol-v2.txt
@@ -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.