]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'ab/help-fixes'
authorJunio C Hamano <gitster@pobox.com>
Wed, 9 Mar 2022 21:38:24 +0000 (13:38 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 9 Mar 2022 21:38:24 +0000 (13:38 -0800)
Updates to how command line options to "git help" are handled.

* ab/help-fixes:
  help: don't print "\n" before single-section output
  help: add --no-[external-commands|aliases] for use with --all
  help: error if [-a|-g|-c] and [-i|-m|-w] are combined
  help: correct usage & behavior of "git help --all"
  help: note the option name on option incompatibility
  help.c: split up list_all_cmds_help() function
  help tests: test "git" and "git help [-a|-g] spacing
  help.c: use puts() instead of printf{,_ln}() for consistency
  help doc: add missing "]" to "[-a|--all]"

1  2 
builtin/help.c

diff --cc builtin/help.c
index b4f2ad3f94eea9175cf5855aaee16934ac040bf6,01eda326c3193caaa3a80fb556fc9ca790d8aae6..222f994f863cba4226e867bf0f1022e9d551e308
@@@ -75,10 -80,10 +80,10 @@@ static struct option builtin_help_optio
  };
  
  static const char * const builtin_help_usage[] = {
-       N_("git help [-a|--all] [--[no-]verbose]]\n"
-          "         [[-i|--info] [-m|--man] [-w|--web]] [<command>]"),
 -      N_("git help [-a|--all] [--[no-]verbose]] [--[no-]external-commands] [--[no-]aliases]"),
++      "git help [-a|--all] [--[no-]verbose]] [--[no-]external-commands] [--[no-]aliases]",
+       N_("git help [[-i|--info] [-m|--man] [-w|--web]] [<command>]"),
 -      N_("git help [-g|--guides]"),
 -      N_("git help [-c|--config]"),
 +      "git help [-g|--guides]",
 +      "git help [-c|--config]",
        NULL
  };