Subject: Re: [PATCH 1/3] diff-format.txt: fix ancient copy-paste error

From: Junio C Hamano <[email-masked]>
Date: Mon, 13 Jun 2022 11:23:02 -0700

"Philippe Blain via GitGitGadget" <[email-masked]> writes:

> From: Philippe Blain <[email-masked]>
>
> Fix what is probably a copy-paste error dating back all the way to
> b6d8f309d9 ([PATCH] diff-raw format update take #2., 2005-05-23).

This indeed is an improvement.

"src" can legitimately be "0\{40\}" for a creation patch, e.g. when
the stat information is stale, but we can argue that it falls into
"look at work tree" case to justify removal of "creation", and use
the space to add "deletion".

> Signed-off-by: Philippe Blain <[email-masked]>
> ---
>  Documentation/diff-format.txt | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/diff-format.txt b/Documentation/diff-format.txt
> index 7a9c3b6ff4c..b8319eeb41d 100644
> --- a/Documentation/diff-format.txt
> +++ b/Documentation/diff-format.txt
> @@ -43,7 +43,7 @@ That is, from the left to the right:
>  . a space.
>  . sha1 for "src"; 0\{40\} if creation or unmerged.
>  . a space.
> -. sha1 for "dst"; 0\{40\} if creation, unmerged or "look at work tree".
> +. sha1 for "dst"; 0\{40\} if deletion, unmerged or "look at work tree".
>  . a space.
>  . status, followed by optional "score" number.
>  . a tab or a NUL when `-z` option is used.