Re: [PATCH v3 2/7] gc: add --keep-base-pack
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Mar 16, 2018, 21:25 UTC
- Message-ID
- <87vadvd87n.fsf@evledraar.gmail.com>
- In-Reply-To
- <20180316192745.19557-3-pclouds@gmail.com>
On Fri, Mar 16 2018, Nguyễn Thái Ngọc Duy jotted:
Show 10 quoted lines
> struct option builtin_gc_options[] = {
> OPT__QUIET(&quiet, N_("suppress progress reporting")),
> @@ -362,6 +390,8 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
> OPT_BOOL(0, "aggressive", &aggressive, N_("be more thorough (increased runtime)")),
> OPT_BOOL(0, "auto", &auto_gc, N_("enable auto-gc mode")),
> OPT_BOOL(0, "force", &force, N_("force running gc even if there may be another gc running")),
> + OPT_BOOL(0, "keep-base-pack", &keep_base_pack,
> + N_("repack all other packs except the base pack")),
> OPT_END()
> };There's an easy to solve merge conflict here between the current master & this. Pushed out a solution (for my own use) at https://github.com/avar/git/ gc-auto-keep-base-pack. Interdiff with yours:
@@ -112,9 +112,9 @@
struct option builtin_gc_options[] = {
OPT__QUIET(&quiet, N_("suppress progress reporting")),
@@
- OPT_BOOL(0, "aggressive", &aggressive, N_("be more thorough (increased runtime)")),
- OPT_BOOL(0, "auto", &auto_gc, N_("enable auto-gc mode")),
- OPT_BOOL(0, "force", &force, N_("force running gc even if there may be another gc running")),
+ 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-base-pack", &keep_base_pack,
+ N_("repack all other packs except the base pack")),
OPT_END()