completion: use __gitcomp_builtin in _git_gc
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Fri, 9 Feb 2018 11:01:58 +0000 (18:01 +0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 9 Feb 2018 18:24:51 +0000 (10:24 -0800)
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>
builtin/gc.c
contrib/completion/git-completion.bash
index 3c5eae0edf12e461e84c71c0e2988fcfa58d3d44..7fc5c16254beb4175458b200a1316565ebf47bf3 100644 (file)
@@ -360,8 +360,11 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
                        N_("prune unreferenced objects"),
                        PARSE_OPT_OPTARG, NULL, (intptr_t)prune_expire },
                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, "auto", &auto_gc, N_("enable auto-gc mode"),
+                          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()
        };
 
index 340e2414ff0f3dccd70ce2d29a3daa087654a04d..79e9f69d52e89c534d27df517f0007760bc651d9 100644 (file)
@@ -1509,7 +1509,7 @@ _git_gc ()
 {
        case "$cur" in
        --*)
-               __gitcomp "--prune --aggressive"
+               __gitcomp_builtin gc
                return
                ;;
        esac