mirror of
https://github.com/git/git.git
synced 2026-01-09 17:46:37 +00:00
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
This commit is contained in:
2
git.c
2
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;
|
||||
|
||||
Reference in New Issue
Block a user