Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit d078d85

Browse files
peffgitster
authored andcommitted
repack: s/write_bitmap/&s/ in code
The config name is "writeBitmaps", so the internal variable missing the plural is unnecessarily confusing to write. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3198b89 commit d078d85

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

builtin/repack.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
static int delta_base_offset = 1;
1212
static int pack_kept_objects = -1;
13-
static int write_bitmap = -1;
13+
static int write_bitmaps = -1;
1414
static char *packdir, *packtmp;
1515

1616
static const char *const git_repack_usage[] = {
@@ -29,7 +29,7 @@ static int repack_config(const char *var, const char *value, void *cb)
2929
return 0;
3030
}
3131
if (!strcmp(var, "pack.writebitmaps")) {
32-
write_bitmap = git_config_bool(var, value);
32+
write_bitmaps = git_config_bool(var, value);
3333
return 0;
3434
}
3535
return git_default_config(var, value, cb);
@@ -172,7 +172,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
172172
OPT__QUIET(&quiet, N_("be quiet")),
173173
OPT_BOOL('l', "local", &local,
174174
N_("pass --local to git-pack-objects")),
175-
OPT_BOOL('b', "write-bitmap-index", &write_bitmap,
175+
OPT_BOOL('b', "write-bitmap-index", &write_bitmaps,
176176
N_("write bitmap index")),
177177
OPT_STRING(0, "unpack-unreachable", &unpack_unreachable, N_("approxidate"),
178178
N_("with -A, do not loosen objects older than this")),
@@ -195,7 +195,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
195195
git_repack_usage, 0);
196196

197197
if (pack_kept_objects < 0)
198-
pack_kept_objects = write_bitmap > 0;
198+
pack_kept_objects = write_bitmaps > 0;
199199

200200
packdir = mkpathdup("%s/pack", get_object_directory());
201201
packtmp = mkpathdup("%s/.tmp-%d-pack", packdir, (int)getpid());
@@ -221,9 +221,9 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
221221
argv_array_pushf(&cmd_args, "--no-reuse-delta");
222222
if (no_reuse_object)
223223
argv_array_pushf(&cmd_args, "--no-reuse-object");
224-
if (write_bitmap >= 0)
224+
if (write_bitmaps >= 0)
225225
argv_array_pushf(&cmd_args, "--%swrite-bitmap-index",
226-
write_bitmap ? "" : "no-");
226+
write_bitmaps ? "" : "no-");
227227

228228
if (pack_everything & ALL_INTO_ONE) {
229229
get_non_kept_pack_filenames(&existing_packs);

0 commit comments

Comments
 (0)