Skip to content

Commit 9ab21ad

Browse files
committed
remembering-renames/sparse-checkout: renumber lists starting at zero
In 5275100 (doc: add some missing technical documents, 2025-10-02), some documents were added to the default set of files to be rendered. Unfortunately, this led to CI failures since Oct 10 (see https://github.com/git/git/actions/runs/18418984731), the eight most recent pushes of Git's `master` as of time of writing. Due to the way Git's automation is set up, it is quite difficult to get to the actual problems, as some known-bogus warnings get suppressed in the check that fails the job, but those warnings are _not_ suppressed in the failed jobs' logs. The actual problems look like this: asciidoc: WARNING: remembering-renames.adoc: line 13: list item index: expected 1 got 0 asciidoc: WARNING: remembering-renames.adoc: line 15: list item index: expected 2 got 1 asciidoc: WARNING: remembering-renames.adoc: line 17: list item index: expected 3 got 2 asciidoc: WARNING: remembering-renames.adoc: line 20: list item index: expected 4 got 3 asciidoc: WARNING: remembering-renames.adoc: line 23: list item index: expected 5 got 4 asciidoc: WARNING: remembering-renames.adoc: line 25: list item index: expected 6 got 5 asciidoc: WARNING: remembering-renames.adoc: line 29: list item index: expected 7 got 6 asciidoc: WARNING: remembering-renames.adoc: line 31: list item index: expected 8 got 7 asciidoc: WARNING: remembering-renames.adoc: line 33: list item index: expected 9 got 8 asciidoc: WARNING: remembering-renames.adoc: line 38: section title out of sequence: expected level 1, got level 2 asciidoc: WARNING: sparse-checkout.adoc: line 17: section title out of sequence: expected level 1, got level 2 asciidoc: WARNING: sparse-checkout.adoc: line 928: list item index: expected 1 got 0 asciidoc: WARNING: sparse-checkout.adoc: line 931: list item index: expected 2 got 1 asciidoc: WARNING: sparse-checkout.adoc: line 951: list item index: expected 3 got 2 asciidoc: WARNING: sparse-checkout.adoc: line 974: list item index: expected 4 got 3 asciidoc: WARNING: sparse-checkout.adoc: line 980: list item index: expected 5 got 4 asciidoc: WARNING: sparse-checkout.adoc: line 1033: list item index: expected 6 got 5 asciidoc: WARNING: sparse-checkout.adoc: line 1049: list item index: expected 7 got 6 The problems fall into two categories. The first one is that there are two lists that start at zero instead of 1, which is unexpected for AsciiDoc. In the same spirit as fef1196 (Renumber list in api-command.txt, 2012-12-15), let's simply renumber those lists. The second category will be addressed in a separate commit. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent e509b5b commit 9ab21ad

File tree

2 files changed

+25
-25
lines changed

2 files changed

+25
-25
lines changed

Documentation/technical/remembering-renames.adoc

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,32 @@ history as an optimization, assuming all merges are automatic and clean
1010

1111
Outline:
1212

13-
0. Assumptions
13+
1. Assumptions
1414

15-
1. How rebasing and cherry-picking work
15+
2. How rebasing and cherry-picking work
1616

17-
2. Why the renames on MERGE_SIDE1 in any given pick are *always* a
17+
3. Why the renames on MERGE_SIDE1 in any given pick are *always* a
1818
superset of the renames on MERGE_SIDE1 for the next pick.
1919

20-
3. Why any rename on MERGE_SIDE1 in any given pick is _almost_ always also
20+
4. Why any rename on MERGE_SIDE1 in any given pick is _almost_ always also
2121
a rename on MERGE_SIDE1 for the next pick
2222

23-
4. A detailed description of the counter-examples to #3.
23+
5. A detailed description of the counter-examples to #3.
2424

25-
5. Why the special cases in #4 are still fully reasonable to use to pair
25+
6. Why the special cases in #4 are still fully reasonable to use to pair
2626
up files for three-way content merging in the merge machinery, and why
2727
they do not affect the correctness of the merge.
2828

29-
6. Interaction with skipping of "irrelevant" renames
29+
7. Interaction with skipping of "irrelevant" renames
3030

31-
7. Additional items that need to be cached
31+
8. Additional items that need to be cached
3232

33-
8. How directory rename detection interacts with the above and why this
33+
9. How directory rename detection interacts with the above and why this
3434
optimization is still safe even if merge.directoryRenames is set to
3535
"true".
3636

3737

38-
=== 0. Assumptions ===
38+
=== 1. Assumptions ===
3939

4040
There are two assumptions that will hold throughout this document:
4141

@@ -91,7 +91,7 @@ this config setting, but we have to discuss a few more cases to show why;
9191
this discussion is deferred until section 8.
9292

9393

94-
=== 1. How rebasing and cherry-picking work ===
94+
=== 2. How rebasing and cherry-picking work ===
9595

9696
Consider the following setup (from the git-rebase manpage):
9797

@@ -138,7 +138,7 @@ Conceptually the two statements above are the same as a three-way merge of
138138
B, B', and C, at least the parts before you decide to record a commit.
139139

140140

141-
=== 2. Why the renames on MERGE_SIDE1 in any given pick are always a ===
141+
=== 3. Why the renames on MERGE_SIDE1 in any given pick are always a ===
142142
=== superset of the renames on MERGE_SIDE1 for the next pick. ===
143143

144144
The merge machinery uses the filenames it is fed from MERGE_BASE,
@@ -181,7 +181,7 @@ are a subset of those between E and G. Equivalently, all renames between E
181181
and G are a superset of those between A and A'.
182182

183183

184-
=== 3. Why any rename on MERGE_SIDE1 in any given pick is _almost_ ===
184+
=== 4. Why any rename on MERGE_SIDE1 in any given pick is _almost_ ===
185185
=== always also a rename on MERGE_SIDE1 for the next pick. ===
186186

187187
Let's again look at the first two picks:
@@ -254,7 +254,7 @@ were detected as renames, A:oldfile and A':newfile should also be
254254
detectable as renames almost always.
255255

256256

257-
=== 4. A detailed description of the counter-examples to #3. ===
257+
=== 5. A detailed description of the counter-examples to #3. ===
258258

259259
We already noted in section 3 that rename/rename(1to1) (i.e. both sides
260260
renaming a file the same way) was one counter-example. The more
@@ -285,7 +285,7 @@ E:oldfile -> G:newfile would be detected as a rename, but A:oldfile and
285285
A':newfile would not be.
286286

287287

288-
=== 5. Why the special cases in #4 are still fully reasonable to use to ===
288+
=== 6. Why the special cases in #4 are still fully reasonable to use to ===
289289
=== pair up files for three-way content merging in the merge machinery, ===
290290
=== and why they do not affect the correctness of the merge. ===
291291

@@ -394,7 +394,7 @@ cases 1 and 3 seem to provide as good or better behavior with the
394394
optimization than without.
395395

396396

397-
=== 6. Interaction with skipping of "irrelevant" renames ===
397+
=== 7. Interaction with skipping of "irrelevant" renames ===
398398

399399
Previous optimizations involved skipping rename detection for paths
400400
considered to be "irrelevant". See for example the following commits:
@@ -421,7 +421,7 @@ detection -- though we can limit it to the paths for which we have not
421421
already detected renames.
422422

423423

424-
=== 7. Additional items that need to be cached ===
424+
=== 8. Additional items that need to be cached ===
425425

426426
It turns out we have to cache more than just renames; we also cache:
427427

@@ -482,7 +482,7 @@ we store the trees to compare with what we are asked to merge next
482482
time.
483483

484484

485-
=== 8. How directory rename detection interacts with the above and ===
485+
=== 9. How directory rename detection interacts with the above and ===
486486
=== why this optimization is still safe even if ===
487487
=== merge.directoryRenames is set to "true". ===
488488

Documentation/technical/sparse-checkout.adoc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -925,10 +925,10 @@ operate full-tree.
925925
This list used to be a lot longer (see e.g. [1,2,3,4,5,6,7,8,9]), but we've
926926
been working on it.
927927

928-
0. Behavior A is not well supported in Git. (Behavior B didn't used to
928+
1. Behavior A is not well supported in Git. (Behavior B didn't used to
929929
be either, but was the easier of the two to implement.)
930930

931-
1. am and apply:
931+
2. am and apply:
932932

933933
apply, without `--index` or `--cached`, relies on files being present
934934
in the working copy, and also writes to them unconditionally. As
@@ -948,7 +948,7 @@ been working on it.
948948
files and then complain that those vivified files would be
949949
overwritten by merge.
950950

951-
2. reset --hard:
951+
3. reset --hard:
952952

953953
reset --hard provides confusing error message (works correctly, but
954954
misleads the user into believing it didn't):
@@ -971,13 +971,13 @@ been working on it.
971971
`git reset --hard` DID remove addme from the index and the working tree, contrary
972972
to the error message, but in line with how reset --hard should behave.
973973

974-
3. read-tree
974+
4. read-tree
975975

976976
`read-tree` doesn't apply the 'SKIP_WORKTREE' bit to *any* of the
977977
entries it reads into the index, resulting in all your files suddenly
978978
appearing to be "deleted".
979979

980-
4. Checkout, restore:
980+
5. Checkout, restore:
981981

982982
These command do not handle path & revision arguments appropriately:
983983

@@ -1030,7 +1030,7 @@ been working on it.
10301030
S tracked
10311031
H tracked-but-maybe-skipped
10321032

1033-
5. checkout and restore --staged, continued:
1033+
6. checkout and restore --staged, continued:
10341034

10351035
These commands do not correctly scope operations to the sparse
10361036
specification, and make it worse by not setting important SKIP_WORKTREE
@@ -1046,7 +1046,7 @@ been working on it.
10461046
the sparse specification, but then it will be important to set the
10471047
SKIP_WORKTREE bits appropriately.
10481048

1049-
6. Performance issues; see:
1049+
7. Performance issues; see:
10501050
https://lore.kernel.org/git/CABPp-BEkJQoKZsQGCYioyga_uoDQ6iBeW+FKr8JhyuuTMK1RDw@mail.gmail.com/
10511051

10521052

0 commit comments

Comments
 (0)