Skip to content

Commit b3ac6e7

Browse files
LemmingAvalanchegitster
authored andcommitted
doc: fix accidental literal blocks
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*` Signed-off-by: Kristoffer Haugsbakk <[email protected]> Acked-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c44beea commit b3ac6e7

File tree

5 files changed

+64
-48
lines changed

5 files changed

+64
-48
lines changed

Documentation/config/core.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ The built-in file system monitor is currently available only on a
7575
limited set of supported platforms. Currently, this includes Windows
7676
and MacOS.
7777
+
78-
Otherwise, this variable contains the pathname of the "fsmonitor"
79-
hook command.
78+
Otherwise, this variable contains the pathname of the "fsmonitor"
79+
hook command.
8080
+
8181
This hook command is used to identify all files that may have changed
8282
since the requested date/time. This information is used to speed up

Documentation/git-config.adoc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -117,15 +117,15 @@ OPTIONS
117117

118118
--comment <message>::
119119
Append a comment at the end of new or modified lines.
120-
121-
If _<message>_ begins with one or more whitespaces followed
122-
by "#", it is used as-is. If it begins with "#", a space is
123-
prepended before it is used. Otherwise, a string " # " (a
124-
space followed by a hash followed by a space) is prepended
125-
to it. And the resulting string is placed immediately after
126-
the value defined for the variable. The _<message>_ must
127-
not contain linefeed characters (no multi-line comments are
128-
permitted).
120+
+
121+
If _<message>_ begins with one or more whitespaces followed
122+
by "#", it is used as-is. If it begins with "#", a space is
123+
prepended before it is used. Otherwise, a string " # " (a
124+
space followed by a hash followed by a space) is prepended
125+
to it. And the resulting string is placed immediately after
126+
the value defined for the variable. The _<message>_ must
127+
not contain linefeed characters (no multi-line comments are
128+
permitted).
129129

130130
--all::
131131
With `get`, return all values for a multi-valued key.

Documentation/git-rev-parse.adoc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -174,13 +174,13 @@ for another option.
174174

175175
Allow oids to be input from any object format that the current
176176
repository supports.
177-
178-
Specifying "sha1" translates if necessary and returns a sha1 oid.
179-
180-
Specifying "sha256" translates if necessary and returns a sha256 oid.
181-
182-
Specifying "storage" translates if necessary and returns an oid in
183-
encoded in the storage hash algorithm.
177+
+
178+
Specifying "sha1" translates if necessary and returns a sha1 oid.
179+
+
180+
Specifying "sha256" translates if necessary and returns a sha256 oid.
181+
+
182+
Specifying "storage" translates if necessary and returns an oid in
183+
encoded in the storage hash algorithm.
184184

185185
Options for Objects
186186
~~~~~~~~~~~~~~~~~~~

Documentation/git-shortlog.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ OPTIONS
4444
describe each commit. '<format>' can be any string accepted
4545
by the `--format` option of 'git log', such as '* [%h] %s'.
4646
(See the "PRETTY FORMATS" section of linkgit:git-log[1].)
47-
48-
Each pretty-printed commit will be rewrapped before it is shown.
47+
+
48+
Each pretty-printed commit will be rewrapped before it is shown.
4949

5050
--date=<format>::
5151
Show dates formatted according to the given date string. (See

Documentation/git-sparse-checkout.adoc

Lines changed: 44 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -264,34 +264,50 @@ patterns in non-cone mode has a number of shortcomings:
264264
inconsistent.
265265

266266
* It has edge cases where the "right" behavior is unclear. Two examples:
267-
268-
First, two users are in a subdirectory, and the first runs
269-
git sparse-checkout set '/toplevel-dir/*.c'
270-
while the second runs
271-
git sparse-checkout set relative-dir
272-
Should those arguments be transliterated into
273-
current/subdirectory/toplevel-dir/*.c
274-
and
275-
current/subdirectory/relative-dir
276-
before inserting into the sparse-checkout file? The user who typed
277-
the first command is probably aware that arguments to set/add are
278-
supposed to be patterns in non-cone mode, and probably would not be
279-
happy with such a transliteration. However, many gitignore-style
280-
patterns are just paths, which might be what the user who typed the
281-
second command was thinking, and they'd be upset if their argument
282-
wasn't transliterated.
283-
284-
Second, what should bash-completion complete on for set/add commands
285-
for non-cone users? If it suggests paths, is it exacerbating the
286-
problem above? Also, if it suggests paths, what if the user has a
287-
file or directory that begins with either a '!' or '#' or has a '*',
288-
'\', '?', '[', or ']' in its name? And if it suggests paths, will
289-
it complete "/pro" to "/proc" (in the root filesystem) rather than to
290-
"/progress.txt" in the current directory? (Note that users are
291-
likely to want to start paths with a leading '/' in non-cone mode,
292-
for the same reason that .gitignore files often have one.)
293-
Completing on files or directories might give nasty surprises in
294-
all these cases.
267+
+
268+
First, two users are in a subdirectory, and the first runs
269+
+
270+
----
271+
git sparse-checkout set '/toplevel-dir/*.c'
272+
----
273+
+
274+
while the second runs
275+
+
276+
----
277+
git sparse-checkout set relative-dir
278+
----
279+
+
280+
Should those arguments be transliterated into
281+
+
282+
----
283+
current/subdirectory/toplevel-dir/*.c
284+
----
285+
+
286+
and
287+
+
288+
----
289+
current/subdirectory/relative-dir
290+
----
291+
+
292+
before inserting into the sparse-checkout file? The user who typed
293+
the first command is probably aware that arguments to set/add are
294+
supposed to be patterns in non-cone mode, and probably would not be
295+
happy with such a transliteration. However, many gitignore-style
296+
patterns are just paths, which might be what the user who typed the
297+
second command was thinking, and they'd be upset if their argument
298+
wasn't transliterated.
299+
+
300+
Second, what should bash-completion complete on for set/add commands
301+
for non-cone users? If it suggests paths, is it exacerbating the
302+
problem above? Also, if it suggests paths, what if the user has a
303+
file or directory that begins with either a '!' or '#' or has a '*',
304+
'\', '?', '[', or ']' in its name? And if it suggests paths, will
305+
it complete "/pro" to "/proc" (in the root filesystem) rather than to
306+
"/progress.txt" in the current directory? (Note that users are
307+
likely to want to start paths with a leading '/' in non-cone mode,
308+
for the same reason that .gitignore files often have one.)
309+
Completing on files or directories might give nasty surprises in
310+
all these cases.
295311

296312
* The excessive flexibility made other extensions essentially
297313
impractical. `--sparse-index` is likely impossible in non-cone

0 commit comments

Comments
 (0)