Clean up commit insertion in git-rev-list
[gitweb.git] / upload-pack.c
index d35c0685ce2269cec48d19fbf6b0499374a34b7e..6d844cc3199ae5bda475ec57bef4efb4901176bb 100644 (file)
@@ -5,7 +5,7 @@
 static const char upload_pack_usage[] = "git-upload-pack <dir>";
 
 #define MAX_HAS (16)
-#define MAX_NEEDS (16)
+#define MAX_NEEDS (256)
 static int nr_has = 0, nr_needs = 0;
 static unsigned char has_sha1[MAX_HAS][20];
 static unsigned char needs_sha1[MAX_NEEDS][20];
@@ -153,6 +153,7 @@ static int send_ref(const char *refname, const unsigned char *sha1)
 
 static int upload_pack(void)
 {
+       head_ref(send_ref);
        for_each_ref(send_ref);
        packet_flush(1);
        nr_needs = receive_needs();