git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jean-Noël Avila via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: "Jean-Noël Avila" <jn.avila@free.fr>,
	"Jean-Noël Avila" <jn.avila@free.fr>
Subject: [PATCH 3/5] doc: convert git-status tables to AsciiDoc format
Date: Sat, 20 Dec 2025 19:16:25 +0000	[thread overview]
Message-ID: <de0deb31cf5537d9c2d2edffc74d5ccda0452602.1766258187.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.2020.git.1766258187.gitgitgadget@gmail.com>

From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= <jn.avila@free.fr>

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>
---
 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


  parent reply	other threads:[~2025-12-20 19:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-20 19:16 [PATCH 0/5] doc: convert git-status, git remote and git stage to synopsis style Jean-Noël Avila via GitGitGadget
2025-12-20 19:16 ` [PATCH 1/5] doc: fix t0450-txt-doc-vs-help to select only first synopsis block Jean-Noël Avila via GitGitGadget
2025-12-20 19:16 ` [PATCH 2/5] doc: convert git-status to synopsis style Jean-Noël Avila via GitGitGadget
2025-12-20 19:16 ` Jean-Noël Avila via GitGitGadget [this message]
2025-12-20 19:16 ` [PATCH 4/5] doc: convert git stage to use synopsis block Jean-Noël Avila via GitGitGadget
2025-12-20 19:16 ` [PATCH 5/5] doc: convert git-remote to synopsis style Jean-Noël Avila via GitGitGadget

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=de0deb31cf5537d9c2d2edffc74d5ccda0452602.1766258187.git.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jn.avila@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).