Skip to content

Commit cdc71c1

Browse files
pcloudsgitster
authored andcommitted
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>
1 parent c893985 commit cdc71c1

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

builtin/ls-remote.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,9 @@ int cmd_ls_remote(int argc, const char **argv, const char *prefix)
6060
OPT_BIT(0, "refs", &flags, N_("do not show peeled tags"), REF_NORMAL),
6161
OPT_BOOL(0, "get-url", &get_url,
6262
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),
6566
OPT_BOOL(0, "symref", &show_symref_target,
6667
N_("show underlying ref in addition to the object pointed by it")),
6768
OPT_END()

contrib/completion/git-completion.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1630,7 +1630,7 @@ _git_ls_remote ()
16301630
{
16311631
case "$cur" in
16321632
--*)
1633-
__gitcomp "--heads --tags --refs --get-url --symref"
1633+
__gitcomp_builtin ls-remote
16341634
return
16351635
;;
16361636
esac

0 commit comments

Comments
 (0)