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

[PATCH 2/2] Documentation/git-status: document porcelain status T (typechange)

From
Johannes Altmanninger <aclopte@gmail.com>
Date
Oct 2, 2021, 21:30 UTC
Message-ID
<20211002213046.725892-2-aclopte@gmail.com>
In-Reply-To
<20211002213046.725892-1-aclopte@gmail.com>

As reported in [1], T is missing from the description of porcelain status letters in git-status(1) (whereas T is documented in git-diff-files(1) and friends). Document T right after M (modified) because the two are very similar.

A porcelain status containing C (copied) is impossible because "git status" does not detect copies, only renames. I was going to delete mentions of C from git-status.txt because it keeps confusing users [2] but a discussion from 2014 suggests that "git status" should re-learn to detect copies, which was disabled in 2005 for (obsolete) performance reasons [3].

[1] https://github.com/fish-shell/fish-shell/issues/8311 [2] https://www.reddit.com/r/git/comments/ppc2l9/how_to_get_a_file_with_copied_status/ [3] https://marc.info/?l=git&m=141755095826447&w=2

Signed-off-by: Johannes Altmanninger <aclopte@gmail.com>
---
 Documentation/git-status.txt | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/Documentation/git-status.txt b/Documentation/git-status.txt
index 83f38e3198..40f308c6a6 100644
--- a/Documentation/git-status.txt
+++ b/Documentation/git-status.txt
@@ -207,6 +207,7 @@ show tracked paths:
 
 * ' ' = unmodified
 * 'M' = modified
+* 'T' = file type changed (regular file, symbolic link or submodule)
 * 'A' = added
 * 'D' = deleted
 * 'R' = renamed
@@ -217,14 +218,16 @@ show tracked paths:
 X          Y     Meaning
 -------------------------------------------------
 	 [AMD]   not updated
-M        [ MD]   updated in index
-A        [ MD]   added to index
+M        [ MTD]  updated in index
+T        [ MTD]  type changed in index
+A        [ MTD]  added to index
 D                deleted from index
-R        [ MD]   renamed in index
-C        [ MD]   copied in index
-[MARC]           index and work tree matches
-[ MARC]     M    work tree changed since index
-[ MARC]     D    deleted in work tree
+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
 [ D]        R    renamed in work tree
 [ D]        C    copied in work tree
 -------------------------------------------------
-- 
2.33.0.rc2.dirty
Previous: Johannes AltmanningerNext: Johannes Altmanninger
Message 2 of 16 in “Documentation/diff-format: state in which cases porcelain status is T”
  1. 1/2 Documentation/diff-format: state in which cases porcelain status is TJohannes Altmanninger, Oct 2, 2021
  2. 2/2 Documentation/git-status: document porcelain status T (typechange)Johannes Altmanninger, Oct 2, 2021
  3. Johannes AltmanningerOct 2, 2021
  4. Elijah NewrenOct 2, 2021
  5. Johannes AltmanningerOct 4, 2021
  6. 1/4 Documentation/git-status: remove impossible porcelain status DR and DCJohannes Altmanninger, Oct 4, 2021
  7. 2/4 Documentation/diff-format: state in which cases porcelain status is TJohannes Altmanninger, Oct 4, 2021
  8. 3/4 Documentation/git-status: document porcelain status T (typechange)Johannes Altmanninger, Oct 4, 2021
  9. 4/4 Documentation/git-status: mention how to detect copiesJohannes Altmanninger, Oct 4, 2021
  10. Bagas SanjayaOct 5, 2021
  11. Johannes AltmanningerOct 5, 2021
  12. Bagas SanjayaOct 6, 2021
  13. Elijah NewrenOct 6, 2021
  14. Junio C HamanoOct 4, 2021
  15. Junio C HamanoOct 4, 2021
  16. Elijah NewrenOct 2, 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.