aboutsummaryrefslogtreecommitdiffstats
path: root/usage.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-08-25 14:22:00 -0700
committerJunio C Hamano <gitster@pobox.com>2025-08-25 14:22:00 -0700
commita3c6459ab6610d93da8c95000d0ffc803ce39892 (patch)
treeade7727a3e71d67afb9319b77c8c47eace8f83e7 /usage.c
parentThe second batch (diff)
parentbuiltin: also setup gently for --help-all (diff)
downloadgit-a3c6459ab6610d93da8c95000d0ffc803ce39892.tar.gz
git-a3c6459ab6610d93da8c95000d0ffc803ce39892.zip
Merge branch 'dk/help-all'
"git cmd --help-all" now works outside repositories. * dk/help-all: builtin: also setup gently for --help-all parse-options: refactor flags for usage_with_options_internal
Diffstat (limited to 'usage.c')
-rw-r--r--usage.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usage.c b/usage.c
index 81913236a4..4c245ba0cb 100644
--- a/usage.c
+++ b/usage.c
@@ -192,7 +192,8 @@ static void show_usage_if_asked_helper(const char *err, ...)
void show_usage_if_asked(int ac, const char **av, const char *err)
{
- if (ac == 2 && !strcmp(av[1], "-h"))
+ if (ac == 2 && (!strcmp(av[1], "-h") ||
+ !strcmp(av[1], "--help-all")))
show_usage_if_asked_helper(err);
}