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:
committed by
Junio C Hamano
parent
b016918b2f
commit
58f2ed051f
@ -13,6 +13,13 @@ static void add_sought_entry_mem(struct ref ***sought, int *nr, int *alloc,
|
||||
const char *name, int namelen)
|
||||
{
|
||||
struct ref *ref = xcalloc(1, sizeof(*ref) + namelen + 1);
|
||||
unsigned char sha1[20];
|
||||
|
||||
if (namelen > 41 && name[40] == ' ' && !get_sha1_hex(name, sha1)) {
|
||||
hashcpy(ref->old_sha1, sha1);
|
||||
name += 41;
|
||||
namelen -= 41;
|
||||
}
|
||||
|
||||
memcpy(ref->name, name, namelen);
|
||||
ref->name[namelen] = '\0';
|
||||
|
||||
Reference in New Issue
Block a user