fix multi_ack.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Johannes Schindelin
2005-10-28 05:56:41 +02:00
committed by Junio C Hamano
parent c4c86f07d0
commit 1f5881bb5f
2 changed files with 10 additions and 5 deletions

View File

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