- packet_write(1, "%s %s\n", sha1_to_hex(sha1), refname);
+ static char *capabilities = "multi_ack";
+ struct object *o = parse_object(sha1);
+
+ if (!o)
+ die("git-upload-pack: cannot find object %s:", sha1_to_hex(sha1));
+
+ 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++;
+ }
+ if (o->type == tag_type) {
+ o = deref_tag(o, refname, 0);
+ packet_write(1, "%s %s^{}\n", sha1_to_hex(o->sha1), refname);
+ }