From: Stan Hu <stanhu@gmail.com>
To: gitster@pobox.com
Cc: git@vger.kernel.org, Stan Hu <stanhu@gmail.com>
Subject: [PATCH] fetch-pack: Add missing line-feed character when sending depth-request packet line
Date: Mon, 11 Apr 2016 00:48:48 -0700 [thread overview]
Message-ID: <1460360928-95956-1-git-send-email-stanhu@gmail.com> (raw)
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.
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;
--
2.7.3
next reply other threads:[~2016-04-11 7:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-11 7:48 Stan Hu [this message]
2016-04-12 22:31 ` [PATCH] fetch-pack: Add missing line-feed character when sending depth-request packet line Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1460360928-95956-1-git-send-email-stanhu@gmail.com \
--to=stanhu@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).