Skip to content

Commit 83dc443

Browse files
avargitster
authored andcommitted
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 e145efa (Merge branch 'ab/cat-file' into next, 2022-01-05). In particular 57d6a1c, 5a40417 and 97fe725 in that series. We'll now correctly emit this usage output: $ git cat-file -h usage: git cat-file <type> <object> or: git cat-file (-e | -p) <object> or: git cat-file (-t | -s) [--allow-unknown-type] <object> [...] Before this the last line of that would be inconsistent with the preceding "(-e | -p)": or: git cat-file ( -t | -s ) [--allow-unknown-type] <object> Reported-by: Jiang Xin <[email protected]> Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Acked-by: Taylor Blau <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 245b948 commit 83dc443

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Documentation/git-cat-file.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ SYNOPSIS
1111
[verse]
1212
'git cat-file' <type> <object>
1313
'git cat-file' (-e | -p) <object>
14-
'git cat-file' ( -t | -s ) [--allow-unknown-type] <object>
14+
'git cat-file' (-t | -s) [--allow-unknown-type] <object>
1515
'git cat-file' (--batch | --batch-check) [--batch-all-objects]
1616
[--buffer] [--follow-symlinks] [--unordered]
1717
[--textconv | --filters]
18-
'git cat-file' (--textconv | --filters )
18+
'git cat-file' (--textconv | --filters)
1919
[<rev>:<path|tree-ish> | --path=<path|tree-ish> <rev>]
2020

2121
DESCRIPTION

builtin/cat-file.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -653,11 +653,11 @@ int cmd_cat_file(int argc, const char **argv, const char *prefix)
653653
const char * const usage[] = {
654654
N_("git cat-file <type> <object>"),
655655
N_("git cat-file (-e | -p) <object>"),
656-
N_("git cat-file ( -t | -s ) [--allow-unknown-type] <object>"),
656+
N_("git cat-file (-t | -s) [--allow-unknown-type] <object>"),
657657
N_("git cat-file (--batch | --batch-check) [--batch-all-objects]\n"
658658
" [--buffer] [--follow-symlinks] [--unordered]\n"
659659
" [--textconv | --filters]"),
660-
N_("git cat-file (--textconv | --filters )\n"
660+
N_("git cat-file (--textconv | --filters)\n"
661661
" [<rev>:<path|tree-ish> | --path=<path|tree-ish> <rev>]"),
662662
NULL
663663
};
@@ -699,7 +699,7 @@ int cmd_cat_file(int argc, const char **argv, const char *prefix)
699699
OPT_CMDMODE(0, "filters", &opt,
700700
N_("run filters on object's content"), 'w'),
701701
OPT_STRING(0, "path", &force_path, N_("blob|tree"),
702-
N_("use a <path> for (--textconv | --filters ); Not with 'batch'")),
702+
N_("use a <path> for (--textconv | --filters); Not with 'batch'")),
703703
OPT_END()
704704
};
705705

0 commit comments

Comments
 (0)