git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] docs: add description of status output table

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Jan 9, 2021, 22:06 UTC
Message-ID
<20210109220614.759779-1-sandals@crustytoothpaste.net>
In-Reply-To
<X/oAhdZlLwcFRCrR@ACM>

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 <sandals@crustytoothpaste.net>
---
 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
 -------------------------------------------------
Previous: brian m. carlsonNext: Junio C Hamano
Message 3 of 10 in “Difficulties of scripting git”
  1. Alan MackenzieJan 9, 2021
  2. brian m. carlsonJan 9, 2021
  3. docs: add description of status output tablebrian m. carlson, Jan 9, 2021
  4. Junio C HamanoJan 10, 2021
  5. brian m. carlsonJan 10, 2021
  6. Alan MackenzieJan 10, 2021
  7. brian m. carlsonJan 10, 2021
  8. docs: rephrase and clarify the git status --short formatbrian m. carlson, Jan 10, 2021
  9. Junio C HamanoJan 11, 2021
  10. brian m. carlsonJan 16, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.