doc: fix accidental literal blocks
PATCH 1/1 doc: fix accidental literal blocks
From: Kristoffer Haugsbakk <[email protected]>
Make sure that normal paragraphs in most user-facing docs[1] don’t use literal blocks. This can easily happen if you try to maintain indentation in order to continue a block; that might work in e.g. Markdown variants, but not in AsciiDoc.
The fixes are straightforward, i.e. just deindent the block and maybe add line continuations. The only exception is git-sparse-checkout(1) where we also replace indentation used for *intended* literal blocks with ----.
† 1: These have not been considered:
• Documentation/howto/
• Documentation/technical/
• Documentation/gitprotocol*
---
Notes (series):
I have noticed and sent patches for these things in the past because I randomly spotted them, more or less. This time though I have tried to go through the docs and actively look for them. These should be the only ones if my hunting approach was sound.
About not considering those other docs:
In general, the *technical* documentation has worse HTML output than the more user-facing docs, to the point where it looks like they might not have been written with output formats/publishing in mind. So there might not be a point to fixing them.
I could have fixed one paragraph in gitprotocol-v2 but then that raises the question of what about the other paragraphs? That in turn made the commit message too long just for that point so I dropped it.
Documentation/config/core.adoc | 4 +- Documentation/git-config.adoc | 18 +++---- Documentation/git-rev-parse.adoc | 14 ++--- Documentation/git-shortlog.adoc | 4 +- Documentation/git-sparse-checkout.adoc | 72 ++++++++++++++++---------- 5 files changed, 64 insertions(+), 48 deletions(-)
Documentation/config/core.adoc +2 -2
@@ -75,8 +75,8 @@ The built-in file system monitor is currently available only on a limited set of supported platforms. Currently, this includes Windows and MacOS. + - Otherwise, this variable contains the pathname of the "fsmonitor" - hook command. +Otherwise, this variable contains the pathname of the "fsmonitor" +hook command. + This hook command is used to identify all files that may have changed since the requested date/time. This information is used to speed up
Documentation/git-config.adoc +9 -9
@@ -117,15 +117,15 @@ OPTIONS --comment <message>:: Append a comment at the end of new or modified lines. - - If _<message>_ begins with one or more whitespaces followed - by "#", it is used as-is. If it begins with "#", a space is - prepended before it is used. Otherwise, a string " # " (a - space followed by a hash followed by a space) is prepended - to it. And the resulting string is placed immediately after - the value defined for the variable. The _<message>_ must - not contain linefeed characters (no multi-line comments are - permitted). ++ +If _<message>_ begins with one or more whitespaces followed +by "#", it is used as-is. If it begins with "#", a space is +prepended before it is used. Otherwise, a string " # " (a +space followed by a hash followed by a space) is prepended +to it. And the resulting string is placed immediately after +the value defined for the variable. The _<message>_ must +not contain linefeed characters (no multi-line comments are +permitted). --all:: With `get`, return all values for a multi-valued key.
Documentation/git-rev-parse.adoc +7 -7
@@ -174,13 +174,13 @@ for another option. Allow oids to be input from any object format that the current repository supports. - - Specifying "sha1" translates if necessary and returns a sha1 oid. - - Specifying "sha256" translates if necessary and returns a sha256 oid. - - Specifying "storage" translates if necessary and returns an oid in - encoded in the storage hash algorithm. ++ +Specifying "sha1" translates if necessary and returns a sha1 oid. ++ +Specifying "sha256" translates if necessary and returns a sha256 oid. ++ +Specifying "storage" translates if necessary and returns an oid in +encoded in the storage hash algorithm. Options for Objects ~~~~~~~~~~~~~~~~~~~
Documentation/git-shortlog.adoc +2 -2
@@ -44,8 +44,8 @@ OPTIONS describe each commit. '<format>' can be any string accepted by the `--format` option of 'git log', such as '* [%h] %s'. (See the "PRETTY FORMATS" section of linkgit:git-log[1].) - - Each pretty-printed commit will be rewrapped before it is shown. ++ +Each pretty-printed commit will be rewrapped before it is shown. --date=<format>:: Show dates formatted according to the given date string. (See
Documentation/git-sparse-checkout.adoc +44 -28
78 lines not on this page · raw message
base-commit: c44beea485f0f2feaf460e2ac87fdd5608d63cf0
Signature · 1 line
2.51.0.352.g356bc2d8d49
Quoted 9 lines · On Wed, Oct 08, 2025 at 01:48:46PM +0200, [email protected]…
Make sure that normal paragraphs in most user-facing docs[1] don’t use literal blocks. This can easily happen if you try to maintain indentation in order to continue a block; that might work in e.g. Markdown variants, but not in AsciiDoc.
The fixes are straightforward, i.e. just deindent the block and maybe add line continuations. The only exception is git-sparse-checkout(1) where we also replace indentation used for *intended* literal blocks with
----.
I gave a quick look over the results of doc-diff before and after, and all of the changes look good to me.
-Peff
Quoted 4 lines · Jeff King
Quoted 1 line
[snip]
I gave a quick look over the results of doc-diff before and after, and all of the changes look good to me.
Thanks!
PATCH v2 1/1 doc: fix accidental literal blocks
In reply to [email protected]From: Kristoffer Haugsbakk <[email protected]>
Make sure that normal paragraphs in most user-facing docs[1] don’t use literal blocks. This can easily happen if you try to maintain indentation in order to continue a block; that might work in e.g. Markdown variants, but not in AsciiDoc.
The fixes are straightforward, i.e. just deindent the block and maybe add line continuations. The only exception is git-sparse-checkout(1) where we also replace indentation used for *intended* literal blocks with ----.
† 1: These have not been considered:
• Documentation/howto/
• Documentation/technical/
• Documentation/gitprotocol*
---
Notes (series):
v2:
• Add ack
§ Cover letter text
I have noticed and sent patches for these things in the past because I randomly spotted them, more or less. This time though I have tried to go through the docs and actively look for them. These should be the only ones if my hunting approach was sound.
About not considering those other docs:
In general, the *technical* documentation has worse HTML output than the more user-facing docs, to the point where it looks like they might not have been written with output formats/publishing in mind. So there might not be a point to fixing them.
I could have fixed one paragraph in gitprotocol-v2 but then that raises the question of what about the other paragraphs? That in turn made the commit message too long just for that point so I dropped it.
Documentation/config/core.adoc | 4 +- Documentation/git-config.adoc | 18 +++---- Documentation/git-rev-parse.adoc | 14 ++--- Documentation/git-shortlog.adoc | 4 +- Documentation/git-sparse-checkout.adoc | 72 ++++++++++++++++---------- 5 files changed, 64 insertions(+), 48 deletions(-)
Documentation/config/core.adoc +2 -2
@@ -75,8 +75,8 @@ The built-in file system monitor is currently available only on a limited set of supported platforms. Currently, this includes Windows and MacOS. + - Otherwise, this variable contains the pathname of the "fsmonitor" - hook command. +Otherwise, this variable contains the pathname of the "fsmonitor" +hook command. + This hook command is used to identify all files that may have changed since the requested date/time. This information is used to speed up
Documentation/git-config.adoc +9 -9
@@ -117,15 +117,15 @@ OPTIONS --comment <message>:: Append a comment at the end of new or modified lines. - - If _<message>_ begins with one or more whitespaces followed - by "#", it is used as-is. If it begins with "#", a space is - prepended before it is used. Otherwise, a string " # " (a - space followed by a hash followed by a space) is prepended - to it. And the resulting string is placed immediately after - the value defined for the variable. The _<message>_ must - not contain linefeed characters (no multi-line comments are - permitted). ++ +If _<message>_ begins with one or more whitespaces followed +by "#", it is used as-is. If it begins with "#", a space is +prepended before it is used. Otherwise, a string " # " (a +space followed by a hash followed by a space) is prepended +to it. And the resulting string is placed immediately after +the value defined for the variable. The _<message>_ must +not contain linefeed characters (no multi-line comments are +permitted). --all:: With `get`, return all values for a multi-valued key.
Documentation/git-rev-parse.adoc +7 -7
@@ -174,13 +174,13 @@ for another option. Allow oids to be input from any object format that the current repository supports. - - Specifying "sha1" translates if necessary and returns a sha1 oid. - - Specifying "sha256" translates if necessary and returns a sha256 oid. - - Specifying "storage" translates if necessary and returns an oid in - encoded in the storage hash algorithm. ++ +Specifying "sha1" translates if necessary and returns a sha1 oid. ++ +Specifying "sha256" translates if necessary and returns a sha256 oid. ++ +Specifying "storage" translates if necessary and returns an oid in +encoded in the storage hash algorithm. Options for Objects ~~~~~~~~~~~~~~~~~~~
Documentation/git-shortlog.adoc +2 -2
@@ -44,8 +44,8 @@ OPTIONS describe each commit. '<format>' can be any string accepted by the `--format` option of 'git log', such as '* [%h] %s'. (See the "PRETTY FORMATS" section of linkgit:git-log[1].) - - Each pretty-printed commit will be rewrapped before it is shown. ++ +Each pretty-printed commit will be rewrapped before it is shown. --date=<format>:: Show dates formatted according to the given date string. (See
Documentation/git-sparse-checkout.adoc +44 -28
78 lines not on this page · raw message
Interdiff against v1:
Range-diff against v1:
1: 7a955ecb1b5 ! 1: 619841a5663 doc: fix accidental literal blocks
@@ Commit message
• Documentation/technical/
• Documentation/gitprotocol*
+ Acked-by: Jeff King <[email protected]>
## Notes (series) ##
+ v2:
+
+ • Add ack
+
+ § Cover letter text
+
I have noticed and sent patches for these things in the past because I randomly spotted them, more or less. This time though I have tried to go through the docs and actively look for them. These should be the
base-commit: c44beea485f0f2feaf460e2ac87fdd5608d63cf0
Signature · 1 line
2.51.0.352.g356bc2d8d49