diff options
author | Jeff King <peff@peff.net> | 2022-08-25 13:51:40 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-08-25 19:43:30 +0300 |
commit | 8f9d80f6c06369b563c76ec46c462e740a1a2cf0 (patch) | |
tree | eadfafe679ae608d3763a895707e3e6254273db8 /git-sh-i18n.sh | |
parent | 0d330a53f31a0885954ac48c5e6d24efd3969039 (diff) |
remote: run "remote rm" argv through parse_options()
The "git remote rm" command's option parsing is fairly primitive: it
insists on a single argument, which it treats as the remote name, and
displays a usage message otherwise.
This is OK, and maybe even convenient, as you could run:
git remote rm --foo
to drop a remote named "--foo". But it's also weirdly unlike most of the
rest of Git, which would complain that there is no option "--foo". The
right way to spell it by our conventions is:
git remote rm -- --foo
but this doesn't currently work.
So let's bring the command in line with the rest of Git (including its
sibling subcommands!) by feeding argv to parse_options(). We already
have an empty options array for the usage helper.
Note that we have to adjust the argc index down by one, as
parse_options() eats the program name from the start of the array.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-sh-i18n.sh')
0 files changed, 0 insertions, 0 deletions