]> git.ipfire.org Git - thirdparty/git.git/blobdiff - sha1_name.c
Merge branch 'ds/find-unique-abbrev-optim'
[thirdparty/git.git] / sha1_name.c
index 05a635911be3c6b27cb3c572500483c47cee9b56..2d6b48047b3cfb3ddb3f830389fa03b821c4d721 100644 (file)
@@ -159,7 +159,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;