]> git.ipfire.org Git - thirdparty/git.git/commit
doc: sparse-checkout.adoc: fix asciidoc warnings
authorRamsay Jones <ramsay@ramsayjones.plus.com>
Thu, 2 Oct 2025 22:12:15 +0000 (23:12 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 3 Oct 2025 16:45:39 +0000 (09:45 -0700)
commit987683dbf36c41fb0a1ac9b59de547bf161d11c9
tree5a48185dad01fb39e75d0e92f7063293817bf226
parent189e6c0bb18ede747044b9e981a06834e0553008
doc: sparse-checkout.adoc: fix asciidoc warnings

Both asciidoc and asciidoctor issue warnings about 'list item index:
expected n got n-1' for n=1->7 on lines 928, 931, 951, 974, 980, 1033
and 1049. In asciidoc, numbered lists must start at one, whereas this
file has a list starting at zero. Also, asciidoc and asciidoctor warn
about 'section title out of sequence: expected level 1, got level 2'
on line 17. (asciidoc only complains about the first instance of this,
while asciidoctor complains about them all, on lines 95, 258, 303, 316,
545, 612, 752, 824, 895, 923 and 1053). These warnings stem from the
section titles not being correctly nested within a document/chapter
title.

In order to address the first set of warnings, simply renumber the list
from one to severn, rather than zero to six. Fortunately, this does not
require altering additional text, since the enumeration of 'Known Bugs'
is not referred to anywhere else in the document.

In order to address the second set of warnings, change the section title
syntax from '=== title ===' to '== title ==', effectively reducing the
nesting level of the title by one. Also, some apparent (sub-)titles are
not marked up with sub-title syntax, so add some '=== ' prefix(s) to the
relevant headings.

In addition to the warnings, address some other formatting issues:

  - the use of heavily nested unordered lists is not reflected in the
    output (making the file totally unreadable) because each level of
    nesting requires a different syntax. (i.e. replace '*' with '**'
    for the second level, '*' with '***' for the third level, etc.)
  - make use of literal blocks and manual indentation to get asciidoc
    and asciidoctor to display even remotely similar output.
  - make use of labelled lists, in some places, to get a similar looking
    output to the input, for both asciidoc and asciidoctor.
  - replace the trailing space in: `git grep ${SEARCH_TERM} OLDREV `
    otherwise the entire line in which that appears is removed from
    the output.

Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/technical/sparse-checkout.adoc