diff mbox series

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

Message ID 20211004190050.921109-1-aclopte@gmail.com (mailing list archive)
State Accepted
Commit 1566cdd4aea973592ef1871197bc3d6b74b42d7e
Headers show
Series [v2,1/4] Documentation/git-status: remove impossible porcelain status DR and DC | expand

Commit Message

Johannes Altmanninger Oct. 4, 2021, 7 p.m. UTC
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)

Comments

Junio C Hamano Oct. 4, 2021, 8:02 p.m. UTC | #1
Johannes Altmanninger <aclopte@gmail.com> writes:

> 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

I do not see lines with horizontal tabs used in exiting entries to
skip to columns.  Perhaps these two lines should follow suit.

>  -------------------------------------------------
>  D           D    unmerged, both deleted
>  A           U    unmerged, added by us
Junio C Hamano Oct. 4, 2021, 8:12 p.m. UTC | #2
Junio C Hamano <gitster@pobox.com> writes:

> Johannes Altmanninger <aclopte@gmail.com> writes:
>
>> 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
>
> I do not see lines with horizontal tabs used in exiting entries to
> skip to columns.  Perhaps these two lines should follow suit.

Nah, there is one before the pre-context of this hunk.  I guess it
is OK, and certainly would not need a reroll for it.

Thanks.
diff mbox series

Patch

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