remote-mediawiki: show progress while fetching namespaces
[gitweb.git] / sha1_name.c
index 862b6f1308e7031317ab6eb6d181652a6fc644ad..c7c5ab376ccb56b3a4f4533f61293bd543ea8097 100644 (file)
@@ -9,6 +9,7 @@
 #include "remote.h"
 #include "dir.h"
 #include "sha1-array.h"
+#include "packfile.h"
 
 static int get_oid_oneline(const char *, struct object_id *, struct commit_list *);
 
@@ -156,7 +157,7 @@ static void unique_in_pack(struct packed_git *p,
        num = p->num_objects;
        last = num;
        while (first < last) {
-               uint32_t mid = (first + last) / 2;
+               uint32_t mid = first + (last - first) / 2;
                const unsigned char *current;
                int cmp;