Subject: [PATCH 3/5] doc: convert git-status tables to AsciiDoc format

From: "Jean-Noël Avila via GitGitGadget" <[email-masked]>
Date: Sat, 20 Dec 2025 19:16:25 +0000

From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= <[email-masked]>

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 <[email-masked]>
---
 Documentation/git-status.adoc | 170 +++++++++++++++++-----------------
 1 file changed, 85 insertions(+), 85 deletions(-)

diff --git a/Documentation/git-status.adoc b/Documentation/git-status.adoc
index 37b0453898..9acca52bfb 100644
--- a/Documentation/git-status.adoc
+++ b/Documentation/git-status.adoc
@@ -219,35 +219,32 @@ show tracked paths:
 `C`:: copied (if config option status.renames is set to "copies")
 `U`:: updated but unmerged
 
-....
-X          Y     Meaning
--------------------------------------------------
-	 [AMD]   not updated
-M        [ MTD]  updated in index
-T        [ MTD]  type changed in index
-A        [ MTD]  added to index
-D                deleted from index
-R        [ MTD]  renamed in index
-C        [ MTD]  copied in index
-[MTARC]          index and work tree matches
-[ MTARC]    M    work tree changed since index
-[ MTARC]    T    type changed in work tree since index
-[ MTARC]    D    deleted in work tree
-	    R    renamed in work tree
-	    C    copied in work tree
--------------------------------------------------
-D           D    unmerged, both deleted
-A           U    unmerged, added by us
-U           D    unmerged, deleted by them
-U           A    unmerged, added by them
-D           U    unmerged, deleted by us
-A           A    unmerged, both added
-U           U    unmerged, both modified
--------------------------------------------------
-?           ?    untracked
-!           !    ignored
--------------------------------------------------
-....
+[cols="^1m,^1m,<2",options="header"]
+|===
+|X        |  Y     |Meaning
+|         |[AMD]   |not updated
+|M        |[ MTD]  |updated in index
+|T        |[ MTD]  |type changed in index
+|A        |[ MTD]  |added to index
+|D        |        |deleted from index
+|R        |[ MTD]  |renamed in index
+|C        |[ MTD]  |copied in index
+|[MTARC]  |        |index and work tree matches
+|[ MTARC] |M       |work tree changed since index
+|[ MTARC] |T       |type changed in work tree since index
+|[ MTARC] |D       |deleted in work tree
+|         |R       |renamed in work tree
+|         |C       |copied in work tree
+|D        |D       |unmerged, both deleted
+|A        |U       |unmerged, added by us
+|U        |D       |unmerged, deleted by them
+|U        |A       |unmerged, added by them
+|D        |U       |unmerged, deleted by us
+|A        |A       |unmerged, both added
+|U        |U       |unmerged, both modified
+|?        |?       |untracked
+|!        |!       |ignored
+|===
 
 Submodules have more state and instead report
 
@@ -311,16 +308,15 @@ Branch Headers
 If `--branch` is given, a series of header lines are printed with
 information about the current branch.
 
-....
-Line                                     Notes
-------------------------------------------------------------
-# branch.oid <commit> | (initial)        Current commit.
-# branch.head <branch> | (detached)      Current branch.
-# branch.upstream <upstream-branch>      If upstream is set.
-# branch.ab +<ahead> -<behind>           If upstream is set and
-					 the commit is present.
-------------------------------------------------------------
-....
+[cols="<1,<1",options="header"]
+|===
+|Line                                     |Notes
+|`# branch.oid <commit> \| (initial)`     |Current commit.
+|`# branch.head <branch> \| (detached)`   |Current branch.
+|`# branch.upstream <upstream-branch>`    |If upstream is set.
+|`# branch.ab +<ahead> -<behind>`         |If upstream is set and
+					  the commit is present.
+|===
 
 Stash Information
 ^^^^^^^^^^^^^^^^^
@@ -349,37 +345,42 @@ Renamed or copied entries have the following format:
 [synopsis]
 2 <XY> <sub> <mH> <mI> <mW> <hH> <hI> <X><score> <path><sep><origPath>
 
-....
-Field       Meaning
---------------------------------------------------------
-<XY>        A 2 character field containing the staged and
-	    unstaged XY values described in the short format,
-	    with unchanged indicated by a "." rather than
-	    a space.
-<sub>       A 4 character field describing the submodule state.
-	    "N..." when the entry is not a submodule.
-	    "S<c><m><u>" when the entry is a submodule.
-	    <c> is "C" if the commit changed; otherwise ".".
-	    <m> is "M" if it has tracked changes; otherwise ".".
-	    <u> is "U" if there are untracked changes; otherwise ".".
-<mH>        The octal file mode in HEAD.
-<mI>        The octal file mode in the index.
-<mW>        The octal file mode in the worktree.
-<hH>        The object name in HEAD.
-<hI>        The object name in the index.
-<X><score>  The rename or copy score (denoting the percentage
-	    of similarity between the source and target of the
-	    move or copy). For example "R100" or "C75".
-<path>      The pathname.  In a renamed/copied entry, this
-	    is the target path.
-<sep>       When the `-z` option is used, the 2 pathnames are separated
-	    with a NUL (ASCII 0x00) byte; otherwise, a tab (ASCII 0x09)
-	    byte separates them.
-<origPath>  The pathname in the commit at HEAD or in the index.
-	    This is only present in a renamed/copied entry, and
-	    tells where the renamed/copied contents came from.
---------------------------------------------------------
-....
+[cols="<1,<1a",options="header"]
+|===
+|Field       | Meaning
+
+|_<XY>_
+|A 2 character field containing the staged and
+unstaged XY values described in the short format,
+with unchanged indicated by a "." rather than
+a space.
+|_<sub>_
+|A 4 character field describing the submodule state.
+"N..." when the entry is not a submodule.
+`S<c><m><u>` when the entry is a submodule.
+
+* _<c>_ is "C" if the commit changed; otherwise ".".
+* _<m>_ is "M" if it has tracked changes; otherwise ".".
+* _<u>_ is "U" if there are untracked changes; otherwise ".".
+|_<mH>_       |The octal file mode in HEAD.
+|_<mI>_       |The octal file mode in the index.
+|_<mW>_       |The octal file mode in the worktree.
+|_<hH>_       |The object name in HEAD.
+|_<hI>_       |The object name in the index.
+|_<X><score>_ |The rename or copy score (denoting the percentage
+of similarity between the source and target of the
+move or copy). For example "R100" or "C75".
+|_<path>_
+|The pathname.  In a renamed/copied entry, this is the target path.
+|_<sep>_
+|When the `-z` option is used, the 2 pathnames are separated
+with a _NUL_ (ASCII 0x00) byte; otherwise, a _TAB_ (ASCII 0x09)
+byte separates them.
+|_<origPath>_
+|The pathname in the commit at HEAD or in the index.
+This is only present in a renamed/copied entry, and
+tells where the renamed/copied contents came from.
+|===
 
 Unmerged entries have the following format; the first character is
 a "u" to distinguish from ordinary changed entries.
@@ -387,23 +388,22 @@ a "u" to distinguish from ordinary changed entries.
 [synopsis]
 u <XY> <sub> <m1> <m2> <m3> <mW> <h1> <h2> <h3> <path>
 
-....
-Field       Meaning
---------------------------------------------------------
-<XY>        A 2 character field describing the conflict type
+[cols="<1,<1a",options="header"]
+|===
+|Field       |Meaning
+|_<XY>_      |A 2 character field describing the conflict type
 	    as described in the short format.
-<sub>       A 4 character field describing the submodule state
+|_<sub>_     |A 4 character field describing the submodule state
 	    as described above.
-<m1>        The octal file mode in stage 1.
-<m2>        The octal file mode in stage 2.
-<m3>        The octal file mode in stage 3.
-<mW>        The octal file mode in the worktree.
-<h1>        The object name in stage 1.
-<h2>        The object name in stage 2.
-<h3>        The object name in stage 3.
-<path>      The pathname.
---------------------------------------------------------
-....
+|_<m1>_      |The octal file mode in stage 1.
+|_<m2>_      |The octal file mode in stage 2.
+|_<m3>_      |The octal file mode in stage 3.
+|_<mW>_      |The octal file mode in the worktree.
+|_<h1>_      |The object name in stage 1.
+|_<h2>_      |The object name in stage 2.
+|_<h3>_      |The object name in stage 3.
+|_<path>_    |The pathname.
+|===
 
 Other Items
 ^^^^^^^^^^^
-- 
gitgitgadget