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>
maint
Nguyễn Thái Ngọc Duy 2018-02-09 18:01:58 +07:00 committed by Junio C Hamano
parent 4d77dd9093
commit 7e1eeaa431
2 changed files with 6 additions and 3 deletions

View File

@ -360,8 +360,11 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
N_("prune unreferenced objects"), N_("prune unreferenced objects"),
PARSE_OPT_OPTARG, NULL, (intptr_t)prune_expire }, PARSE_OPT_OPTARG, NULL, (intptr_t)prune_expire },
OPT_BOOL(0, "aggressive", &aggressive, N_("be more thorough (increased runtime)")), OPT_BOOL(0, "aggressive", &aggressive, N_("be more thorough (increased runtime)")),
OPT_BOOL(0, "auto", &auto_gc, N_("enable auto-gc mode")), OPT_BOOL_F(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")), PARSE_OPT_NOCOMPLETE),
OPT_BOOL_F(0, "force", &force,
N_("force running gc even if there may be another gc running"),
PARSE_OPT_NOCOMPLETE),
OPT_END() OPT_END()
}; };



View File

@ -1509,7 +1509,7 @@ _git_gc ()
{ {
case "$cur" in case "$cur" in
--*) --*)
__gitcomp "--prune --aggressive" __gitcomp_builtin gc
return return
;; ;;
esac esac