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

[PATCH v2 1/4] Documentation/git-status: remove impossible porcelain status DR and DC

From
Johannes Altmanninger <aclopte@gmail.com>
Date
Oct 4, 2021, 19:00 UTC
Message-ID
<20211004190050.921109-1-aclopte@gmail.com>
In-Reply-To
<CABPp-BFqJi0q0844NKfU8K5HRpAJ7yP2OkyBUiFQSAw-ZjNoyw@mail.gmail.com>

Commit 176ea74793 ("wt-status.c: handle worktree renames", 2017-12-27) made a porcelain status like .R or .C possible. They occur only when the source file is added to the index and the destination file is added with --intent-to-add.

They also documented DR, but that status is impossible. The index change D means that the source file does not exist in the index. The worktree change R/C states that the file has been renamed/copied since the index, but that's impossible if it did not exist there.

Reported-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Johannes Altmanninger <aclopte@gmail.com>
---
 Documentation/git-status.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
(the diff looks off by one column but that's just because we use tabs for indentation)
diff --git a/Documentation/git-status.txt b/Documentation/git-status.txt
index 83f38e3198..20f496094a 100644
--- a/Documentation/git-status.txt
+++ b/Documentation/git-status.txt
@@ -225,8 +225,8 @@ C        [ MD]   copied in index
 [MARC]           index and work tree matches
 [ MARC]     M    work tree changed since index
 [ MARC]     D    deleted in work tree
-[ D]        R    renamed in work tree
-[ D]        C    copied in work tree
+	    R    renamed in work tree
+	    C    copied in work tree
 -------------------------------------------------
 D           D    unmerged, both deleted
 A           U    unmerged, added by us
-- 
2.33.0.rc2.dirty
Previous: Johannes AltmanningerNext: Johannes Altmanninger
Message 6 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.