Thread (40 messages) flat view 40 messages, 4 authors, 2021-09-23
STALE1810d

Revision v1 of 3 in this series.

Revisions (3)
  1. v1 current
  2. v2 [diff vs current]
  3. v3 [diff vs current]

[PATCH 1/6] help: correct the usage string in -h and documentation

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2021-09-08 15:24:35
Subsystem: documentation, the rest · Maintainers: Jonathan Corbet, Linus Torvalds

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 (local)

Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
---
 Documentation/git-help.txt | 2 +-
 builtin/help.c             | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/Documentation/git-help.txt b/Documentation/git-help.txt
index 44fe8860b3f..568a0b606f3 100644
--- a/Documentation/git-help.txt
+++ b/Documentation/git-help.txt
@@ -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
 -----------
diff --git a/builtin/help.c b/builtin/help.c
index b7eec06c3de..44ea2798cda 100644
--- a/builtin/help.c
+++ b/builtin/help.c
@@ -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
 };
 
-- 
2.33.0.825.g2bf60429931
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help