Skip to content

Commit 7e1eeaa

Browse files
pcloudsgitster
authored andcommitted
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>
1 parent 4d77dd9 commit 7e1eeaa

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

builtin/gc.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,8 +360,11 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
360360
N_("prune unreferenced objects"),
361361
PARSE_OPT_OPTARG, NULL, (intptr_t)prune_expire },
362362
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),
365368
OPT_END()
366369
};
367370

contrib/completion/git-completion.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1509,7 +1509,7 @@ _git_gc ()
15091509
{
15101510
case "$cur" in
15111511
--*)
1512-
__gitcomp "--prune --aggressive"
1512+
__gitcomp_builtin gc
15131513
return
15141514
;;
15151515
esac

0 commit comments

Comments
 (0)