doc: convert git-status tables to AsciiDoc format
Instead of plain text tables with hand formatting, take advantage of asciidoc's table syntax to let the renderer do the heavy lifting and make the tables more maintainable and translatable. Signed-off-by: Jean-Noël Avila <jn.avila@free.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jean-Noël Avila committed
Dec 20, 2025 at 19:16 UTC
ead7aae0e457bb0acbf20409b6cf36a89480e8b2
1 file changed
+85
-85
Documentation/git-status.adoc
+85
-85
@@ -219,35 +219,32 @@ show tracked paths:
219
`C`:: copied (if config option status.renames is set to "copies")
220
`U`:: updated but unmerged
221
222
-....
223
-X Y Meaning
224
--------------------------------------------------
225
- [AMD] not updated
226
-M [ MTD] updated in index
227
-T [ MTD] type changed in index
228
-A [ MTD] added to index
229
-D deleted from index
230
-R [ MTD] renamed in index
231
-C [ MTD] copied in index
232
-[MTARC] index and work tree matches
233
-[ MTARC] M work tree changed since index
234
-[ MTARC] T type changed in work tree since index
235
-[ MTARC] D deleted in work tree
236
- R renamed in work tree
237
- C copied in work tree
238
--------------------------------------------------
239
-D D unmerged, both deleted
240
-A U unmerged, added by us
241
-U D unmerged, deleted by them
242
-U A unmerged, added by them
243
-D U unmerged, deleted by us
244
-A A unmerged, both added
245
-U U unmerged, both modified
246
--------------------------------------------------
247
-? ? untracked
248
-! ! ignored
249
--------------------------------------------------
250
-....
222
+[cols="^1m,^1m,<2",options="header"]
223
+|===
224
+|X | Y |Meaning
225
+| |[AMD] |not updated
226
+|M |[ MTD] |updated in index
227
+|T |[ MTD] |type changed in index
228
+|A |[ MTD] |added to index
229
+|D | |deleted from index
230
+|R |[ MTD] |renamed in index
231
+|C |[ MTD] |copied in index
232
+|[MTARC] | |index and work tree matches
233
+|[ MTARC] |M |work tree changed since index
234
+|[ MTARC] |T |type changed in work tree since index
235
+|[ MTARC] |D |deleted in work tree
236
+| |R |renamed in work tree
237
+| |C |copied in work tree
238
+|D |D |unmerged, both deleted
239
+|A |U |unmerged, added by us
240
+|U |D |unmerged, deleted by them
241
+|U |A |unmerged, added by them
242
+|D |U |unmerged, deleted by us
243
+|A |A |unmerged, both added
244
+|U |U |unmerged, both modified
245
+|? |? |untracked
246
+|! |! |ignored
247
+|===
248
249
Submodules have more state and instead report
250
@@ -311,16 +308,15 @@ Branch Headers
308
If `--branch` is given, a series of header lines are printed with
309
information about the current branch.
310
314
-....
315
-Line Notes
316
-------------------------------------------------------------
317
-# branch.oid <commit> | (initial) Current commit.
318
-# branch.head <branch> | (detached) Current branch.
319
-# branch.upstream <upstream-branch> If upstream is set.
320
-# branch.ab +<ahead> -<behind> If upstream is set and
321
- the commit is present.
322
-------------------------------------------------------------
323
-....
311
+[cols="<1,<1",options="header"]
312
+|===
313
+|Line |Notes
314
+|`# branch.oid <commit> \| (initial)` |Current commit.
315
+|`# branch.head <branch> \| (detached)` |Current branch.
316
+|`# branch.upstream <upstream-branch>` |If upstream is set.
317
+|`# branch.ab +<ahead> -<behind>` |If upstream is set and
318
+ the commit is present.
319
+|===
320
321
Stash Information
322
^^^^^^^^^^^^^^^^^
@@ -349,37 +345,42 @@ Renamed or copied entries have the following format:
345
[synopsis]
346
2 <XY> <sub> <mH> <mI> <mW> <hH> <hI> <X><score> <path><sep><origPath>
347
352
-....
353
-Field Meaning
354
---------------------------------------------------------
355
-<XY> A 2 character field containing the staged and
356
- unstaged XY values described in the short format,
357
- with unchanged indicated by a "." rather than
358
- a space.
359
-<sub> A 4 character field describing the submodule state.
360
- "N..." when the entry is not a submodule.
361
- "S<c><m><u>" when the entry is a submodule.
362
- <c> is "C" if the commit changed; otherwise ".".
363
- <m> is "M" if it has tracked changes; otherwise ".".
364
- <u> is "U" if there are untracked changes; otherwise ".".
365
-<mH> The octal file mode in HEAD.
366
-<mI> The octal file mode in the index.
367
-<mW> The octal file mode in the worktree.
368
-<hH> The object name in HEAD.
369
-<hI> The object name in the index.
370
-<X><score> The rename or copy score (denoting the percentage
371
- of similarity between the source and target of the
372
- move or copy). For example "R100" or "C75".
373
-<path> The pathname. In a renamed/copied entry, this
374
- is the target path.
375
-<sep> When the `-z` option is used, the 2 pathnames are separated
376
- with a NUL (ASCII 0x00) byte; otherwise, a tab (ASCII 0x09)
377
- byte separates them.
378
-<origPath> The pathname in the commit at HEAD or in the index.
379
- This is only present in a renamed/copied entry, and
380
- tells where the renamed/copied contents came from.
381
---------------------------------------------------------
382
-....
348
+[cols="<1,<1a",options="header"]
349
+|===
350
+|Field | Meaning
351
+
352
+|_<XY>_
353
+|A 2 character field containing the staged and
354
+unstaged XY values described in the short format,
355
+with unchanged indicated by a "." rather than
356
+a space.
357
+|_<sub>_
358
+|A 4 character field describing the submodule state.
359
+"N..." when the entry is not a submodule.
360
+`S<c><m><u>` when the entry is a submodule.
361
+
362
+* _<c>_ is "C" if the commit changed; otherwise ".".
363
+* _<m>_ is "M" if it has tracked changes; otherwise ".".
364
+* _<u>_ is "U" if there are untracked changes; otherwise ".".
365
+|_<mH>_ |The octal file mode in HEAD.
366
+|_<mI>_ |The octal file mode in the index.
367
+|_<mW>_ |The octal file mode in the worktree.
368
+|_<hH>_ |The object name in HEAD.
369
+|_<hI>_ |The object name in the index.
370
+|_<X><score>_ |The rename or copy score (denoting the percentage
371
+of similarity between the source and target of the
372
+move or copy). For example "R100" or "C75".
373
+|_<path>_
374
+|The pathname. In a renamed/copied entry, this is the target path.
375
+|_<sep>_
376
+|When the `-z` option is used, the 2 pathnames are separated
377
+with a _NUL_ (ASCII 0x00) byte; otherwise, a _TAB_ (ASCII 0x09)
378
+byte separates them.
379
+|_<origPath>_
380
+|The pathname in the commit at HEAD or in the index.
381
+This is only present in a renamed/copied entry, and
382
+tells where the renamed/copied contents came from.
383
+|===
384
385
Unmerged entries have the following format; the first character is
386
a "u" to distinguish from ordinary changed entries.
@@ -387,23 +388,22 @@ a "u" to distinguish from ordinary changed entries.
388
[synopsis]
389
u <XY> <sub> <m1> <m2> <m3> <mW> <h1> <h2> <h3> <path>
390
390
-....
391
-Field Meaning
392
---------------------------------------------------------
393
-<XY> A 2 character field describing the conflict type
391
+[cols="<1,<1a",options="header"]
392
+|===
393
+|Field |Meaning
394
+|_<XY>_ |A 2 character field describing the conflict type
395
as described in the short format.
395
-<sub> A 4 character field describing the submodule state
396
+|_<sub>_ |A 4 character field describing the submodule state
397
as described above.
397
-<m1> The octal file mode in stage 1.
398
-<m2> The octal file mode in stage 2.
399
-<m3> The octal file mode in stage 3.
400
-<mW> The octal file mode in the worktree.
401
-<h1> The object name in stage 1.
402
-<h2> The object name in stage 2.
403
-<h3> The object name in stage 3.
404
-<path> The pathname.
405
---------------------------------------------------------
406
-....
398
+|_<m1>_ |The octal file mode in stage 1.
399
+|_<m2>_ |The octal file mode in stage 2.
400
+|_<m3>_ |The octal file mode in stage 3.
401
+|_<mW>_ |The octal file mode in the worktree.
402
+|_<h1>_ |The object name in stage 1.
403
+|_<h2>_ |The object name in stage 2.
404
+|_<h3>_ |The object name in stage 3.
405
+|_<path>_ |The pathname.
406
+|===
407
408
Other Items
409
^^^^^^^^^^^