Merge branch 'ds/close-object-store'
[gitweb.git] / builtin / repack.c
index 4de8b6600c4523f275121244522bc8654173dcbd..f834b5551b1ffe003b943c18cd35397e9196e730 100644 (file)
@@ -14,7 +14,7 @@
 
 static int delta_base_offset = 1;
 static int pack_kept_objects = -1;
-static int write_bitmaps;
+static int write_bitmaps = -1;
 static int use_delta_islands;
 static char *packdir, *packtmp;
 
@@ -343,6 +343,9 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
            (unpack_unreachable || (pack_everything & LOOSEN_UNREACHABLE)))
                die(_("--keep-unreachable and -A are incompatible"));
 
+       if (write_bitmaps < 0)
+               write_bitmaps = (pack_everything & ALL_INTO_ONE) &&
+                                is_bare_repository();
        if (pack_kept_objects < 0)
                pack_kept_objects = write_bitmaps;