Skip to content

Commit b408452

Browse files
avargitster
authored andcommitted
help: correct the usage string in -h and documentation
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/[email protected] Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 8b7c11b commit b408452

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Documentation/git-help.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ SYNOPSIS
99
--------
1010
[verse]
1111
'git help' [-a|--all [--[no-]verbose]] [-g|--guides]
12-
[-i|--info|-m|--man|-w|--web] [COMMAND|GUIDE]
12+
[[-i|--info] [-m|--man] [-w|--web]] [COMMAND|GUIDE]
1313

1414
DESCRIPTION
1515
-----------

builtin/help.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ static struct option builtin_help_options[] = {
5959
};
6060

6161
static const char * const builtin_help_usage[] = {
62-
N_("git help [--all] [--guides] [--man | --web | --info] [<command>]"),
62+
N_("git help [-a|--all] [-g|--guides] [--[no-]verbose]]\n"
63+
" [[-i|--info] [-m|--man] [-w|--web]] [<command>]"),
6364
NULL
6465
};
6566

0 commit comments

Comments
 (0)