From: Ævar Arnfjörð Bjarmason Date: Mon, 10 Jan 2022 22:08:45 +0000 (+0100) Subject: cat-file: don't whitespace-pad "(...)" in SYNOPSIS and usage output X-Git-Tag: v2.36.0-rc0~187^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=83dc443439ca0fdc9f99fc1ed623d0749ef637ed;p=thirdparty%2Fgit.git cat-file: don't whitespace-pad "(...)" in SYNOPSIS and usage output Fix up whitespace issues around "(... | ...)" in the SYNOPSIS and usage. These were introduced in ab/cat-file series. See e145efa6059 (Merge branch 'ab/cat-file' into next, 2022-01-05). In particular 57d6a1cf96, 5a40417876 and 97fe7250753 in that series. We'll now correctly emit this usage output: $ git cat-file -h usage: git cat-file or: git cat-file (-e | -p) or: git cat-file (-t | -s) [--allow-unknown-type] [...] Before this the last line of that would be inconsistent with the preceding "(-e | -p)": or: git cat-file ( -t | -s ) [--allow-unknown-type] Reported-by: Jiang Xin Signed-off-by: Ævar Arnfjörð Bjarmason Acked-by: Taylor Blau Signed-off-by: Junio C Hamano --- diff --git a/Documentation/git-cat-file.txt b/Documentation/git-cat-file.txt index 73ebbc70ee..bef76f4dd0 100644 --- a/Documentation/git-cat-file.txt +++ b/Documentation/git-cat-file.txt @@ -11,11 +11,11 @@ SYNOPSIS [verse] 'git cat-file' 'git cat-file' (-e | -p) -'git cat-file' ( -t | -s ) [--allow-unknown-type] +'git cat-file' (-t | -s) [--allow-unknown-type] 'git cat-file' (--batch | --batch-check) [--batch-all-objects] [--buffer] [--follow-symlinks] [--unordered] [--textconv | --filters] -'git cat-file' (--textconv | --filters ) +'git cat-file' (--textconv | --filters) [: | --path= ] DESCRIPTION diff --git a/builtin/cat-file.c b/builtin/cat-file.c index ad9b3eef4f..e36492235b 100644 --- a/builtin/cat-file.c +++ b/builtin/cat-file.c @@ -653,11 +653,11 @@ int cmd_cat_file(int argc, const char **argv, const char *prefix) const char * const usage[] = { N_("git cat-file "), N_("git cat-file (-e | -p) "), - N_("git cat-file ( -t | -s ) [--allow-unknown-type] "), + N_("git cat-file (-t | -s) [--allow-unknown-type] "), N_("git cat-file (--batch | --batch-check) [--batch-all-objects]\n" " [--buffer] [--follow-symlinks] [--unordered]\n" " [--textconv | --filters]"), - N_("git cat-file (--textconv | --filters )\n" + N_("git cat-file (--textconv | --filters)\n" " [: | --path= ]"), NULL }; @@ -699,7 +699,7 @@ int cmd_cat_file(int argc, const char **argv, const char *prefix) OPT_CMDMODE(0, "filters", &opt, N_("run filters on object's content"), 'w'), OPT_STRING(0, "path", &force_path, N_("blob|tree"), - N_("use a for (--textconv | --filters ); Not with 'batch'")), + N_("use a for (--textconv | --filters); Not with 'batch'")), OPT_END() };