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:
Junio C Hamano
2025-01-28 13:02:22 -08:00
41 changed files with 121 additions and 64 deletions

View File

@@ -620,6 +620,8 @@ int cmd_unpack_objects(int argc,
quiet = !isatty(2);
show_usage_if_asked(argc, argv, unpack_usage);
for (i = 1 ; i < argc; i++) {
const char *arg = argv[i];