completion: use __gitcomp_builtin in _git_gc
The new completable option is --quiet. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nguyễn Thái Ngọc Duy committed
Feb 9, 2018 at 18:01 UTC
7e1eeaa431047d7f71bcaad53f579a405bca41c8
2 files changed
+6
-3
builtin/gc.c
+5
-2
@@ -360,8 +360,11 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
360
N_("prune unreferenced objects"),
361
PARSE_OPT_OPTARG, NULL, (intptr_t)prune_expire },
362
OPT_BOOL(0, "aggressive", &aggressive, N_("be more thorough (increased runtime)")),
363
- OPT_BOOL(0, "auto", &auto_gc, N_("enable auto-gc mode")),
364
- OPT_BOOL(0, "force", &force, N_("force running gc even if there may be another gc running")),
363
+ OPT_BOOL_F(0, "auto", &auto_gc, N_("enable auto-gc mode"),
364
+ PARSE_OPT_NOCOMPLETE),
365
+ OPT_BOOL_F(0, "force", &force,
366
+ N_("force running gc even if there may be another gc running"),
367
+ PARSE_OPT_NOCOMPLETE),
368
OPT_END()
369
};
370
contrib/completion/git-completion.bash
+1
-1
@@ -1509,7 +1509,7 @@ _git_gc ()
1509
{
1510
case "$cur" in
1511
--*)
1512
- __gitcomp "--prune --aggressive"
1512
+ __gitcomp_builtin gc
1513
return
1514
;;
1515
esac