Skip to content

Commit d40cbea

Browse files
committed
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>
1 parent 2b73f5e commit d40cbea

File tree

1 file changed

+85
-85
lines changed

1 file changed

+85
-85
lines changed

Documentation/git-status.adoc

Lines changed: 85 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -218,35 +218,32 @@ show tracked paths:
218218
`C`:: copied (if config option status.renames is set to "copies")
219219
`U`:: updated but unmerged
220220

221-
....
222-
X Y Meaning
223-
-------------------------------------------------
224-
[AMD] not updated
225-
M [ MTD] updated in index
226-
T [ MTD] type changed in index
227-
A [ MTD] added to index
228-
D deleted from index
229-
R [ MTD] renamed in index
230-
C [ MTD] copied in index
231-
[MTARC] index and work tree matches
232-
[ MTARC] M work tree changed since index
233-
[ MTARC] T type changed in work tree since index
234-
[ MTARC] D deleted in work tree
235-
R renamed in work tree
236-
C copied in work tree
237-
-------------------------------------------------
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-
-------------------------------------------------
246-
? ? untracked
247-
! ! ignored
248-
-------------------------------------------------
249-
....
221+
[cols="^1m,^1m,<2",options="header"]
222+
|===
223+
|X | Y |Meaning
224+
| |[AMD] |not updated
225+
|M |[ MTD] |updated in index
226+
|T |[ MTD] |type changed in index
227+
|A |[ MTD] |added to index
228+
|D | |deleted from index
229+
|R |[ MTD] |renamed in index
230+
|C |[ MTD] |copied in index
231+
|[MTARC] | |index and work tree matches
232+
|[ MTARC] |M |work tree changed since index
233+
|[ MTARC] |T |type changed in work tree since index
234+
|[ MTARC] |D |deleted in work tree
235+
| |R |renamed in work tree
236+
| |C |copied in work tree
237+
|D |D |unmerged, both deleted
238+
|A |U |unmerged, added by us
239+
|U |D |unmerged, deleted by them
240+
|U |A |unmerged, added by them
241+
|D |U |unmerged, deleted by us
242+
|A |A |unmerged, both added
243+
|U |U |unmerged, both modified
244+
|? |? |untracked
245+
|! |! |ignored
246+
|===
250247

251248
Submodules have more state and instead report
252249

@@ -311,16 +308,15 @@ Branch Headers
311308
If `--branch` is given, a series of header lines are printed with
312309
information about the current branch.
313310

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+
|===
324320

325321
Stash Information
326322
^^^^^^^^^^^^^^^^^
@@ -349,61 +345,65 @@ Renamed or copied entries have the following format:
349345
[synopsis]
350346
2 <XY> <sub> <mH> <mI> <mW> <hH> <hI> <X><score> <path><sep><origPath>
351347

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+
|===
383384

384385
Unmerged entries have the following format; the first character is
385386
a "u" to distinguish from ordinary changed entries.
386387

387388
[synopsis]
388389
u <XY> <sub> <m1> <m2> <m3> <mW> <h1> <h2> <h3> <path>
389390

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
394395
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
396397
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+
|===
407407

408408
Other Items
409409
^^^^^^^^^^^

0 commit comments

Comments
 (0)