Skip to content

Commit 793c146

Browse files
avargitster
authored andcommitted
gc: rename keep_base_pack variable for --keep-largest-pack
As noted in an earlier change the keep_base_pack variable name is a relic from an earlier on-list version of ae4e89e ("gc: add --keep-largest-pack option", 2018-04-15) before it was renamed to --keep-largest-pack. Let's change the variable name to avoid that confusion, it's easier to read the code if there's a 1=1 mapping between the variable name and option name. Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent db5368b commit 793c146

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

builtin/gc.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
530530
const char *name;
531531
pid_t pid;
532532
int daemonized = 0;
533-
int keep_base_pack = -1;
533+
int keep_largest_pack = -1;
534534
timestamp_t dummy;
535535

536536
struct option builtin_gc_options[] = {
@@ -544,7 +544,7 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
544544
OPT_BOOL_F(0, "force", &force,
545545
N_("force running gc even if there may be another gc running"),
546546
PARSE_OPT_NOCOMPLETE),
547-
OPT_BOOL(0, "keep-largest-pack", &keep_base_pack,
547+
OPT_BOOL(0, "keep-largest-pack", &keep_largest_pack,
548548
N_("repack all other packs except the largest pack")),
549549
OPT_END()
550550
};
@@ -621,8 +621,8 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
621621
} else {
622622
struct string_list keep_pack = STRING_LIST_INIT_NODUP;
623623

624-
if (keep_base_pack != -1) {
625-
if (keep_base_pack)
624+
if (keep_largest_pack != -1) {
625+
if (keep_largest_pack)
626626
find_base_packs(&keep_pack, 0);
627627
} else if (big_pack_threshold) {
628628
find_base_packs(&keep_pack, big_pack_threshold);

0 commit comments

Comments
 (0)