summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Ævar Arnfjörð Bjarmason <avarab@gmail.com>2021-09-22 00:40:35 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-09-23 10:30:43 -0700
commit0a5940fbe7e453652266e765509a576e4df333c7 (patch)
tree081787ae01a986a0a397429907f66984b6fb5ac6 /builtin
parenthelp: correct logic error in combining --all and --config (diff)
downloadtgif-0a5940fbe7e453652266e765509a576e4df333c7.tar.xz
help: correct logic error in combining --all and --guides
The --all and --guides commands could be combined, which wouldn't have any impact on the output except for: git help --all --guides --no-verbose Listing the guide alongside that output was clearly not intended, so let's error out here. See 002b726a400 (builtin/help.c: add list_common_guides_help() function, 2013-04-02) for the initial implementation. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/help.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/builtin/help.c b/builtin/help.c
index d0c9605dbb..30f160a466 100644
--- a/builtin/help.c
+++ b/builtin/help.c
@@ -559,6 +559,10 @@ int cmd_help(int argc, const char **argv, const char *prefix)
usage_msg_opt(_("--config and --all cannot be combined"),
builtin_help_usage, builtin_help_options);
+ if (show_all && show_guides)
+ usage_msg_opt(_("--config and --guides cannot be combined"),
+ builtin_help_usage, builtin_help_options);
+
if (show_config && show_guides)
usage_msg_opt(_("--config and --guides cannot be combined"),
builtin_help_usage, builtin_help_options);