Skip to content

Commit

Permalink
git-cat-file.txt: fix list continuations rendering literally
Browse files Browse the repository at this point in the history
With Asciidoctor, all of the '+' introduced in a797c0e ("cat-file:
add mailmap support to --batch-check option", 2022-12-20) render
literally rather than functioning as list continuations. With asciidoc,
this renders just fine. It's not too surprising that there is room for
ambiguity and surprises here, since we have lists within lists.

Simply replacing all of these '+' with empty lines makes this render
fine using both tools. Except, in the third hunk, where after this inner
'*' list ends, we want to continue with more contents of the outer list
item (`--batch-command=<format>`). We can solve any ambiguity here and
make this clear to both tools by wrapping the inner list in an open
block (using "--").

For consistency, let's wrap all three of these inner lists from
a797c0e in open blocks. This also future-proofs us a little -- if we
ever gain more contents after any of those first two lists, as we did
already in a797c0e for the third list, we're prepared and should
render fine with both asciidoc and Asciidoctor from the start.

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Martin Ågren authored and gitster committed Jan 18, 2023
1 parent a797c0e commit 8534bb4
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions Documentation/git-cat-file.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,47 +93,52 @@ OPTIONS
Print object information and contents for each object provided
on stdin. May not be combined with any other options or arguments
except `--textconv`, `--filters`, or `--use-mailmap`.
+
+
--
* When used with `--textconv` or `--filters`, the input lines
must specify the path, separated by whitespace. See the section
`BATCH OUTPUT` below for details.
+

* When used with `--use-mailmap`, for commit and tag objects, the
contents part of the output shows the identities replaced using the
mailmap mechanism, while the information part of the output shows
the size of the object as if it actually recorded the replacement
identities.
--

--batch-check::
--batch-check=<format>::
Print object information for each object provided on stdin. May not be
combined with any other options or arguments except `--textconv`, `--filters`
or `--use-mailmap`.
+
+
--
* When used with `--textconv` or `--filters`, the input lines must
specify the path, separated by whitespace. See the section
`BATCH OUTPUT` below for details.
+

* When used with `--use-mailmap`, for commit and tag objects, the
printed object information shows the size of the object as if the
identities recorded in it were replaced by the mailmap mechanism.
--

--batch-command::
--batch-command=<format>::
Enter a command mode that reads commands and arguments from stdin. May
only be combined with `--buffer`, `--textconv`, `--use-mailmap` or
`--filters`.
+
+
--
* When used with `--textconv` or `--filters`, the input lines must
specify the path, separated by whitespace. See the section
`BATCH OUTPUT` below for details.
+

* When used with `--use-mailmap`, for commit and tag objects, the
`contents` command shows the identities replaced using the
mailmap mechanism, while the `info` command shows the size
of the object as if it actually recorded the replacement
identities.

--
+
`--batch-command` recognizes the following commands:
+
Expand Down

0 comments on commit 8534bb4

Please sign in to comment.