documentation: use the word "index" in the git-commit man page
[gitweb.git] / connect.c
index 65e79edc77101ba4f195d5ce267c712da52b3b0b..715cdc022340f8792c4bad45ba6a84c27bbfaa7f 100644 (file)
--- a/connect.c
+++ b/connect.c
@@ -72,7 +72,7 @@ struct ref **get_remote_heads(int in, struct ref **list,
                        continue;
                if (nr_match && !path_match(name, nr_match, match))
                        continue;
-               ref = xcalloc(1, sizeof(*ref) + len - 40);
+               ref = alloc_ref(len - 40);
                hashcpy(ref->old_sha1, old_sha1);
                memcpy(ref->name, buffer + 41, len - 40);
                *list = ref;