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>
This commit is contained in:

committed by
Junio C Hamano

parent
ab6a11c580
commit
ebc4a04e84
@ -459,6 +459,8 @@ static int show_gitcomp(struct parse_opt_ctx_t *ctx,
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (opts->flags & PARSE_OPT_COMP_ARG)
|
||||
suffix = "=";
|
||||
printf(" --%s%s", opts->long_name, suffix);
|
||||
}
|
||||
fputc('\n', stdout);
|
||||
|
Reference in New Issue
Block a user