aboutsummaryrefslogtreecommitdiffstats
path: root/git.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 /git.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 'git.c')
-rw-r--r--git.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/git.c b/git.c
index 83eac0aeab..958796d0b4 100644
--- a/git.c
+++ b/git.c
@@ -445,7 +445,7 @@ static int run_builtin(struct cmd_struct *p, int argc, const char **argv, struct
const char *prefix;
int run_setup = (p->option & (RUN_SETUP | RUN_SETUP_GENTLY));
- help = argc == 2 && !strcmp(argv[1], "-h");
+ help = argc == 2 && (!strcmp(argv[1], "-h") || !strcmp(argv[1], "--help-all"));
if (help && (run_setup & RUN_SETUP))
/* demote to GENTLY to allow 'git cmd -h' outside repo */
run_setup = RUN_SETUP_GENTLY;