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

Re: [PATCH] fetch-pack: send server options after command

From
Junio C Hamano <gitster@pobox.com>
Date
May 28, 2019, 18:00 UTC
Message-ID
<xmqqd0k231e1.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20190524191151.GA14606@google.com>
Jonathan Nieder <jrnieder@gmail.com> writes:
Show 22 quoted lines
> Jonathan Tan wrote:
>
>> Currently, if any server options are specified during a protocol v2
>> fetch, server options will be sent before "command=fetch". Write server
>> options to the request buffer in send_fetch_request() so that the
>> components of the request are sent in the correct order.
>>
>> The protocol documentation states that the command must come first. The
>> Git server implementation in serve.c (see process_request() in that
>> file) tolerates any order of command and capability, which is perhaps
>> why we haven't noticed this. This was noticed when testing against a
>> JGit server implementation, which follows the documentation in this
>> regard.
>>
>> Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
>> ---
>>  fetch-pack.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> Oh, dear.  Thanks for fixing it.
>
> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Yeah, looks good.  Thanks.
Show 9 quoted lines
>
> 6e98305985 (clone: send server options when using protocol v2,
> 2019-04-12) is part of release candidates, but it looks like we caught
> this in time to get the fix in before the release.
>
> Should we add an interop test for this to t/interop/?
>
> Thanks,
> Jonathan
Previous: Jonathan Nieder
Message 3 of 3 in “fetch-pack: send server options after command”
  1. fetch-pack: send server options after commandJonathan Tan, May 22, 2019
  2. Jonathan NiederMay 24, 2019
  3. Junio C HamanoMay 28, 2019

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.