]> git.ipfire.org Git - thirdparty/git.git/commitdiff
help: correct the usage string in -h and documentation
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Fri, 10 Sep 2021 11:28:42 +0000 (13:28 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 10 Sep 2021 22:58:00 +0000 (15:58 -0700)
Clarify the usage string in the documentation so we group e.g. -i and
--info, and add the missing short options to the "-h" output.

The alignment of the second line is off now, but will be fixed with
another series of mine[1]. In the meantime let's just assume that fix
will make it in eventually for the purposes of this patch, if it's
misaligned for a bit it doesn't matter much.

1. https://lore.kernel.org/git/cover-0.2-00000000000-20210901T110917Z-avarab@gmail.com

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-help.txt
builtin/help.c

index 44fe8860b3f17bcb64d5d90ed22b6f8898ca93fa..568a0b606f3bde10917e262d56f0bb9cb91fb143 100644 (file)
@@ -9,7 +9,7 @@ SYNOPSIS
 --------
 [verse]
 'git help' [-a|--all [--[no-]verbose]] [-g|--guides]
-          [-i|--info|-m|--man|-w|--web] [COMMAND|GUIDE]
+          [[-i|--info] [-m|--man] [-w|--web]] [COMMAND|GUIDE]
 
 DESCRIPTION
 -----------
index b7eec06c3de8a943fdbd22ba83502d69335726d0..44ea2798cda47367178280472e128986bb499637 100644 (file)
@@ -59,7 +59,8 @@ static struct option builtin_help_options[] = {
 };
 
 static const char * const builtin_help_usage[] = {
-       N_("git help [--all] [--guides] [--man | --web | --info] [<command>]"),
+       N_("git help [-a|--all] [-g|--guides] [--[no-]verbose]]\n"
+          "         [[-i|--info] [-m|--man] [-w|--web]] [<command>]"),
        NULL
 };