On Fri, Mar 16 2018, Nguyễn Thái Ngọc Duy jotted:

>       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()

Reply via email to