]> git.ipfire.org Git - thirdparty/git.git/commit
help: note the option name on option incompatibility
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Mon, 21 Feb 2022 19:38:48 +0000 (20:38 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 23 Feb 2022 21:41:36 +0000 (13:41 -0800)
commitd7f817d376134ec09e6804cdb6e3d062e3308eb9
treeef73b103cf2302827b24da8c5022c23d63b438b1
parent6fb427abbb06236546c0d5b873e580b0a6fdb414
help: note the option name on option incompatibility

Change the errors added in d35d03cf93e (help: simplify by moving to
OPT_CMDMODE(), 2021-09-22) to quote the offending option at the user
when invoked as e.g.:

    git help --guides garbage

Now instead of:

    fatal: this option doesn't take any other arguments

We'll emit:

    fatal: the '--guides' option doesn't take any non-option arguments

Let's also rename the function, as it will be extended to do other
checks that aren't "no extra argc" in a subsequent commit.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/help.c