diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2018-02-09 14:02:12 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-02-09 21:24:52 +0300 |
commit | ebc4a04e8437e704e40a1d35aea030dc03ec8e56 (patch) | |
tree | 28631a3703f8e2a1c9167f7c243241bd915902bd /builtin/remote.c | |
parent | ab6a11c580f50ac37d436510fa4c6984c588f85f (diff) |
remote: force completing --mirror= instead of --mirror
"git remote --mirror" is a special case. Technically it is possible to
specify --mirror without any argument. But we will get a "dangerous,
deprecated!" warning in that case.
This new parse-opt flag allows --git-completion-helper to always
complete --mirror=, ignoring the dangerous use case.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/remote.c')
-rw-r--r-- | builtin/remote.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/remote.c b/builtin/remote.c index d95bf904c3..fce9e5c0f6 100644 --- a/builtin/remote.c +++ b/builtin/remote.c @@ -168,7 +168,7 @@ static int add(int argc, const char **argv) OPT_STRING('m', "master", &master, N_("branch"), N_("master branch")), { OPTION_CALLBACK, 0, "mirror", &mirror, N_("push|fetch"), N_("set up remote as a mirror to push to or fetch from"), - PARSE_OPT_OPTARG, parse_mirror_opt }, + PARSE_OPT_OPTARG | PARSE_OPT_COMP_ARG, parse_mirror_opt }, OPT_END() }; |