OSDN Git Service

merge: save merge state earlier
[git-core/git.git] / builtin / receive-pack.c
index 71c0c76..cabdc55 100644 (file)
@@ -1806,7 +1806,7 @@ static const char *unpack_with_sideband(struct shallow_info *si)
 static void prepare_shallow_update(struct command *commands,
                                   struct shallow_info *si)
 {
-       int i, j, k, bitmap_size = (si->ref->nr + 31) / 32;
+       int i, j, k, bitmap_size = DIV_ROUND_UP(si->ref->nr, 32);
 
        ALLOC_ARRAY(si->used_shallow, si->shallow->nr);
        assign_shallow_commits_to_refs(si, si->used_shallow, NULL);