1010
1111static int delta_base_offset = 1 ;
1212static int pack_kept_objects = -1 ;
13- static int write_bitmaps = -1 ;
13+ static int write_bitmaps ;
1414static char * packdir , * packtmp ;
1515
1616static const char * const git_repack_usage [] = {
@@ -28,7 +28,8 @@ static int repack_config(const char *var, const char *value, void *cb)
2828 pack_kept_objects = git_config_bool (var , value );
2929 return 0 ;
3030 }
31- if (!strcmp (var , "pack.writebitmaps" )) {
31+ if (!strcmp (var , "repack.writebitmaps" ) ||
32+ !strcmp (var , "pack.writebitmaps" )) {
3233 write_bitmaps = git_config_bool (var , value );
3334 return 0 ;
3435 }
@@ -195,7 +196,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
195196 git_repack_usage , 0 );
196197
197198 if (pack_kept_objects < 0 )
198- pack_kept_objects = write_bitmaps > 0 ;
199+ pack_kept_objects = write_bitmaps ;
199200
200201 packdir = mkpathdup ("%s/pack" , get_object_directory ());
201202 packtmp = mkpathdup ("%s/.tmp-%d-pack" , packdir , (int )getpid ());
@@ -221,9 +222,8 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
221222 argv_array_pushf (& cmd_args , "--no-reuse-delta" );
222223 if (no_reuse_object )
223224 argv_array_pushf (& cmd_args , "--no-reuse-object" );
224- if (write_bitmaps >= 0 )
225- argv_array_pushf (& cmd_args , "--%swrite-bitmap-index" ,
226- write_bitmaps ? "" : "no-" );
225+ if (write_bitmaps )
226+ argv_array_push (& cmd_args , "--write-bitmap-index" );
227227
228228 if (pack_everything & ALL_INTO_ONE ) {
229229 get_non_kept_pack_filenames (& existing_packs );
0 commit comments