Thread (4 messages) flat view 4 messages, 2 authors, 2021-01-10
STALE2040d

[PATCH] docs: add description of status output table

From: brian m. carlson <hidden>
Date: 2021-01-09 22:07:51
Subsystem: documentation, the rest · Maintainers: Jonathan Corbet, Linus Torvalds

The table describing the porcelain format in git-status(1) is helpful,
but it's not completely clear what the three sections mean, even to
some contributors.  As a result, users are unable to find how to detect
common cases like merge conflicts programmatically.

Let's improve this situation by describing what each section means:
non-conflicted, conflicted, or untracked files.

Signed-off-by: brian m. carlson <redacted>
---
 Documentation/git-status.txt | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/Documentation/git-status.txt b/Documentation/git-status.txt
index 7731b45f07..63f13c201d 100644
--- a/Documentation/git-status.txt
+++ b/Documentation/git-status.txt
@@ -201,6 +201,10 @@ codes can be interpreted as follows:
 Ignored files are not listed, unless `--ignored` option is in effect,
 in which case `XY` are `!!`.
 
+In the table below, the first section indicates normal non-conflicted states for
+tracked files, the second indicates files where a merge conflict has occurred
+but not yet been resolved, and the third indicates files not tracked by Git.
+
 ....
 X          Y     Meaning
 -------------------------------------------------
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help