From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com> To: git@vger.kernel.org Cc: "Junio C Hamano" <gitster@pobox.com>, "Luc Van Oostenryck" <luc.vanoostenryck@gmail.com>, "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>, "Ævar Arnfjörð Bjarmason" <avarab@gmail.com> Subject: [PATCH 2/2] gc: rename keep_base_pack variable for --keep-largest-pack Date: Fri, 20 Nov 2020 12:55:22 +0100 Message-ID: <20201120115522.23617-2-avarab@gmail.com> (raw) In-Reply-To: <20200806214929.22qgjg3o2noosjuo@ltop.local> As noted in an earlier change the keep_base_pack variable name is a relic from an earlier on-list version of ae4e89e549 ("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 <avarab@gmail.com> --- builtin/gc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin/gc.c b/builtin/gc.c index 5cd2a43f9f..07c15e4b64 100644 --- a/builtin/gc.c +++ b/builtin/gc.c @@ -533,7 +533,7 @@ int cmd_gc(int argc, const char **argv, const char *prefix) const char *name; pid_t pid; int daemonized = 0; - int keep_base_pack = -1; + int keep_largest_pack = -1; timestamp_t dummy; struct option builtin_gc_options[] = { @@ -547,7 +547,7 @@ int cmd_gc(int argc, const char **argv, const char *prefix) OPT_BOOL_F(0, "force", &force, N_("force running gc even if there may be another gc running"), PARSE_OPT_NOCOMPLETE), - OPT_BOOL(0, "keep-largest-pack", &keep_base_pack, + OPT_BOOL(0, "keep-largest-pack", &keep_largest_pack, N_("repack all other packs except the largest pack")), OPT_END() }; @@ -624,8 +624,8 @@ int cmd_gc(int argc, const char **argv, const char *prefix) } else { struct string_list keep_pack = STRING_LIST_INIT_NODUP; - if (keep_base_pack != -1) { - if (keep_base_pack) + if (keep_largest_pack != -1) { + if (keep_largest_pack) find_base_packs(&keep_pack, 0); } else if (big_pack_threshold) { find_base_packs(&keep_pack, big_pack_threshold); -- 2.29.2.222.g5d2a92d10f8
prev parent reply other threads:[~2020-11-20 11:58 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-08-06 21:49 gc docs: git gc --keep-base-pack ? Luc Van Oostenryck 2020-11-20 11:55 ` [PATCH 1/2] gc docs: change --keep-base-pack to --keep-largest-pack Ævar Arnfjörð Bjarmason 2020-11-21 19:43 ` Junio C Hamano 2020-11-23 10:18 ` Ævar Arnfjörð Bjarmason 2020-11-20 11:55 ` Ævar Arnfjörð Bjarmason [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style List information: http://vger.kernel.org/majordomo-info.html * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20201120115522.23617-2-avarab@gmail.com \ --to=avarab@gmail.com \ --cc=git@vger.kernel.org \ --cc=gitster@pobox.com \ --cc=luc.vanoostenryck@gmail.com \ --cc=pclouds@gmail.com \ --subject='Re: [PATCH 2/2] gc: rename keep_base_pack variable for --keep-largest-pack' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
git@vger.kernel.org list mirror (unofficial, one of many) This inbox may be cloned and mirrored by anyone: git clone --mirror https://public-inbox.org/git git clone --mirror http://ou63pmih66umazou.onion/git git clone --mirror http://czquwvybam4bgbro.onion/git git clone --mirror http://hjrcffqmbrq6wope.onion/git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V1 git git/ https://public-inbox.org/git \ git@vger.kernel.org public-inbox-index git Example config snippet for mirrors. Newsgroups are available over NNTP: nntp://news.public-inbox.org/inbox.comp.version-control.git nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git nntp://news.gmane.io/gmane.comp.version-control.git note: .onion URLs require Tor: https://www.torproject.org/ code repositories for project(s) associated with this inbox: https://80x24.org/mirrors/git.git AGPL code for this site: git clone https://public-inbox.org/public-inbox.git