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>
This commit is contained in:
Nguyễn Thái Ngọc Duy
2013-12-05 20:02:49 +07:00
committed by Junio C Hamano
parent b016918b2f
commit 58f2ed051f
2 changed files with 9 additions and 1 deletions

View File

@ -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);