mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-21 20:14:44 +00:00
pkt: correctly advertise capabilitites
The correct way to advertise out capabilities is by appending them to the first 'want' line, using SP as separator, instead of NUL as the server does. Inconsistent documentation lead to the use of NUL in libgit2. Fix this so we can request much more efficient packs from the remote which reduces the indexing time considerably.
This commit is contained in:
parent
0848ec24fa
commit
7b8c9e123d
@ -296,7 +296,7 @@ static int buffer_want_with_caps(git_remote_head *head, git_transport_caps *caps
|
|||||||
git_buf_grow(buf, git_buf_len(buf) + len);
|
git_buf_grow(buf, git_buf_len(buf) + len);
|
||||||
|
|
||||||
git_oid_fmt(oid, &head->oid);
|
git_oid_fmt(oid, &head->oid);
|
||||||
return git_buf_printf(buf, "%04xwant %s%c%s\n", len, oid, 0, capstr);
|
return git_buf_printf(buf, "%04xwant %s %s\n", len, oid, capstr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user