completion: use __gitcomp_builtin in _git_ls_remote

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>

Nguyễn Thái Ngọc Duy committed Feb 9, 2018 at 18:02 UTC cdc71c1c5dabc2da7fd8c5c64dc4a3802720fe74
2 files changed +4 -3
builtin/ls-remote.c
+3 -2
@@ -60,8 +60,9 @@ int cmd_ls_remote(int argc, const char **argv, const char *prefix)
60 OPT_BIT(0, "refs", &flags, N_("do not show peeled tags"), REF_NORMAL),
61 OPT_BOOL(0, "get-url", &get_url,
62 N_("take url.<base>.insteadOf into account")),
63 - OPT_SET_INT(0, "exit-code", &status,
64 - N_("exit with exit code 2 if no matching refs are found"), 2),
63 + OPT_SET_INT_F(0, "exit-code", &status,
64 + N_("exit with exit code 2 if no matching refs are found"),
65 + 2, PARSE_OPT_NOCOMPLETE),
66 OPT_BOOL(0, "symref", &show_symref_target,
67 N_("show underlying ref in addition to the object pointed by it")),
68 OPT_END()
contrib/completion/git-completion.bash
+1 -1
@@ -1630,7 +1630,7 @@ _git_ls_remote ()
1630 {
1631 case "$cur" in
1632 --*)
1633 - __gitcomp "--heads --tags --refs --get-url --symref"
1633 + __gitcomp_builtin ls-remote
1634 return
1635 ;;
1636 esac