]> git.ipfire.org Git - thirdparty/git.git/commit - t/t0012-help.sh
help: error if [-a|-g|-c] and [-i|-m|-w] are combined
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Mon, 21 Feb 2022 19:38:50 +0000 (20:38 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 23 Feb 2022 21:41:37 +0000 (13:41 -0800)
commit503cddacb63b9a37d063de5b11ac188de822e06f
treea29bf3320d0a3f0d3e91fdf071d8a4f31b01599b
parent5e8068b74df8d0c58042a3ffe1c09dbffbbc63f7
help: error if [-a|-g|-c] and [-i|-m|-w] are combined

Add more sanity checking to "git help" usage by erroring out if these
man viewer options are combined with incompatible command-modes that
will never use these documentation viewers.

This continues the work started in d35d03cf93e (help: simplify by
moving to OPT_CMDMODE(), 2021-09-22) of adding more sanity checking to
"git help". Doing this allows us to clarify the "SYNOPSIS" in the
documentation, and the "git help -h" output.

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