]> granicus.if.org Git - git/commitdiff
completion: use __gitcomp_builtin in _git_ls_remote
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Fri, 9 Feb 2018 11:02:03 +0000 (18:02 +0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 9 Feb 2018 18:24:51 +0000 (10:24 -0800)
The new completable options are --quiet and --upload-pack=.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/ls-remote.c
contrib/completion/git-completion.bash

index c4be98ab9e84fdcde2842b88d4bb60600f7bf627..540d56429f5cec4ace8655dd9a870089fc872d2c 100644 (file)
@@ -60,8 +60,9 @@ int cmd_ls_remote(int argc, const char **argv, const char *prefix)
                OPT_BIT(0, "refs", &flags, N_("do not show peeled tags"), REF_NORMAL),
                OPT_BOOL(0, "get-url", &get_url,
                         N_("take url.<base>.insteadOf into account")),
-               OPT_SET_INT(0, "exit-code", &status,
-                           N_("exit with exit code 2 if no matching refs are found"), 2),
+               OPT_SET_INT_F(0, "exit-code", &status,
+                             N_("exit with exit code 2 if no matching refs are found"),
+                             2, PARSE_OPT_NOCOMPLETE),
                OPT_BOOL(0, "symref", &show_symref_target,
                         N_("show underlying ref in addition to the object pointed by it")),
                OPT_END()
index 1ea06b6e170ad740bf2d82a6b269bb77070c62fb..e22ea60bc85a7f00e81463b4bcfbbe49aac81a16 100644 (file)
@@ -1630,7 +1630,7 @@ _git_ls_remote ()
 {
        case "$cur" in
        --*)
-               __gitcomp "--heads --tags --refs --get-url --symref"
+               __gitcomp_builtin ls-remote
                return
                ;;
        esac