git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] protocol-v2.txt: align delim-pkt spec with usage

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 11, 2021, 22:53 UTC
Message-ID
<xmqqpmr6jodt.fsf@gitster.g>
In-Reply-To
<20211111220048.1702896-1-calvinwan@google.com>
Calvin Wan <calvinwan@google.com> writes:
Show 10 quoted lines
> 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
Thanks for an extra level of research. Very much appreciated.
Will queue.
Show 28 quoted lines
>
> Reported-by: Ivan Frade <ifrade@google.com>
> Signed-off-by: Calvin Wan <calvinwan@google.com>
> ---
>  Documentation/technical/protocol-v2.txt | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/technical/protocol-v2.txt b/Documentation/technical/protocol-v2.txt
> index 21e8258ccf..8a877d27e2 100644
> --- a/Documentation/technical/protocol-v2.txt
> +++ b/Documentation/technical/protocol-v2.txt
> @@ -125,11 +125,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.
>
> base-commit: e9e5ba39a78c8f5057262d49e261b42a8660d5b9
Previous: Nasser Grainawi
Message 6 of 6 in “protocol-v2.txt: align delim-pkt spec with usage”
  1. 0/1 protocol-v2.txt: align delim-pkt spec with usageCalvin Wan, Oct 27, 2021
  2. 1/1 protocol-v2.txt: align delim-pkt spec with usageCalvin Wan, Oct 27, 2021
  3. Junio C HamanoOct 27, 2021
  4. protocol-v2.txt: align delim-pkt spec with usageCalvin Wan, Nov 11, 2021
  5. Nasser GrainawiNov 11, 2021
  6. Junio C HamanoNov 11, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.