mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
Merge branch 'jc/show-usage-help'
The help text from "git $cmd -h" appear on the standard output for some $cmd and the standard error for others. The built-in commands have been fixed to show them on the standard output consistently. * jc/show-usage-help: builtin: send usage() help text to standard output oddballs: send usage() help text to standard output builtins: send usage_with_options() help text to standard output usage: add show_usage_if_asked() parse-options: add show_usage_with_options_if_asked() t0012: optionally check that "-h" output goes to stdout
This commit is contained in:
@@ -2427,8 +2427,7 @@ int cmd_am(int argc,
|
||||
OPT_END()
|
||||
};
|
||||
|
||||
if (argc == 2 && !strcmp(argv[1], "-h"))
|
||||
usage_with_options(usage, options);
|
||||
show_usage_with_options_if_asked(argc, argv, usage, options);
|
||||
|
||||
git_config(git_default_config, NULL);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user