summaryrefslogtreecommitdiff
path: root/remote-curl.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2013-12-05 20:02:49 +0700
committerJunio C Hamano <gitster@pobox.com>2013-12-10 16:14:18 -0800
commit58f2ed051fe9b966100d8c531a79200628490ec4 (patch)
tree79a84b42c929cf68e9a0ebfd37f722d0939fb326 /remote-curl.c
parentb016918b2f283513758957b06a14eb2f5c2a9619 (diff)
downloadgit-58f2ed051fe9b966100d8c531a79200628490ec4.tar.gz
remote-curl: pass ref SHA-1 to fetch-pack as well
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'remote-curl.c')
-rw-r--r--remote-curl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/remote-curl.c b/remote-curl.c
index 222210fd31..25d67308c3 100644
--- a/remote-curl.c
+++ b/remote-curl.c
@@ -719,7 +719,8 @@ static int fetch_git(struct discovery *heads,
struct ref *ref = to_fetch[i];
if (!ref->name || !*ref->name)
die("cannot fetch by sha1 over smart http");
- packet_buf_write(&preamble, "%s\n", ref->name);
+ packet_buf_write(&preamble, "%s %s\n",
+ sha1_to_hex(ref->old_sha1), ref->name);
}
packet_buf_flush(&preamble);