summaryrefslogtreecommitdiff
path: root/upload-pack.c
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2005-10-28 03:56:41 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-10-29 05:57:01 (GMT)
commit1f5881bb5f4da97d0bb23024ae91079137326c7e (patch)
treef186d9ca5f3ddc48c30deb4333ff257ee84d57d4 /upload-pack.c
parentc4c86f07d01bc4a05126b129f644e70dd9e244d0 (diff)
downloadgit-1f5881bb5f4da97d0bb23024ae91079137326c7e.zip
git-1f5881bb5f4da97d0bb23024ae91079137326c7e.tar.gz
git-1f5881bb5f4da97d0bb23024ae91079137326c7e.tar.bz2
fix multi_ack.
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'upload-pack.c')
-rw-r--r--upload-pack.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/upload-pack.c b/upload-pack.c
index 686445e..c5eff21 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -212,11 +212,15 @@ static int receive_needs(void)
static int send_ref(const char *refname, const unsigned char *sha1)
{
- static char *capabilities = "\0multi_ack";
+ static char *capabilities = "multi_ack";
struct object *o = parse_object(sha1);
- packet_write(1, "%s %s%s\n", sha1_to_hex(sha1), refname, capabilities);
- capabilities = "";
+ if (capabilities)
+ packet_write(1, "%s %s%c%s\n", sha1_to_hex(sha1), refname,
+ 0, capabilities);
+ else
+ packet_write(1, "%s %s\n", sha1_to_hex(sha1), refname);
+ capabilities = NULL;
if (!(o->flags & OUR_REF)) {
o->flags |= OUR_REF;
nr_our_refs++;