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

Re: [PATCH] fetch-pack: Add missing line-feed character when sending depth-request packet line

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 12, 2016, 22:31 UTC
Message-ID
<xmqqpotuo3vt.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<1460360928-95956-1-git-send-email-stanhu@gmail.com>
Stan Hu <stanhu@gmail.com> writes:
> The pkt-line format mandates: "a sender should include a LF, but the
> receive MUST NOT complain if it is not present." This patch
> is not absolutely necessary since receivers handle the missing the LF,
> but this patch adds it for good measure.
s/since receivers handle/since receivers are expected to handle/;

Have you checked various re-implementations of upload-pack to see which one will break with this change, and made them aware about their non-compliance?

Show 18 quoted lines
>
> Signed-off-by: Stan Hu <stanhu@gmail.com>
> ---
>  fetch-pack.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fetch-pack.c b/fetch-pack.c
> index f96f6df..77299d9 100644
> --- a/fetch-pack.c
> +++ b/fetch-pack.c
> @@ -330,7 +330,7 @@ static int find_common(struct fetch_pack_args *args,
>  	if (is_repository_shallow())
>  		write_shallow_commits(&req_buf, 1, NULL);
>  	if (args->depth > 0)
> -		packet_buf_write(&req_buf, "deepen %d", args->depth);
> +		packet_buf_write(&req_buf, "deepen %d\n", args->depth);
>  	packet_buf_flush(&req_buf);
>  	state_len = req_buf.len;
Previous: Stan Hu
Message 2 of 2 in “fetch-pack: Add missing line-feed character when sending depth-request packet line”
  1. fetch-pack: Add missing line-feed character when sending depth-request packet lineStan Hu, Apr 11, 2016
  2. Junio C HamanoApr 12, 2016

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.