summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <carlos@cmartin.tk>2012-07-13 20:46:16 +0200
committerCarlos Martín Nieto <carlos@cmartin.tk>2012-07-13 20:46:16 +0200
commit7b8c9e123d3925f4d7aaa614a591e4188a80d464 (patch)
tree3abe13a1d8290b25052b29b18a08cf9172df9416
parent0848ec24faf3b6e182d01f61d62540c6f6480c39 (diff)
downloadlibgit2-7b8c9e123d3925f4d7aaa614a591e4188a80d464.tar.gz
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.
-rw-r--r--src/pkt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkt.c b/src/pkt.c
index 88510f4b1..e003b97e2 100644
--- a/src/pkt.c
+++ b/src/pkt.c
@@ -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_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);
}
/*