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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 13, 2022, 18:23 UTC
Message-ID
<xmqq8rq07795.fsf@gitster.g>
In-Reply-To
<6eaf9b3829fa8f7300bc0123c916d5ffa7c7d80b.1655123383.git.gitgitgadget@gmail.com>
"Philippe Blain via GitGitGadget" <gitgitgadget@gmail.com> writes:
> From: Philippe Blain <levraiphilippeblain@gmail.com>
>
> 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".

Show 18 quoted lines
> Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com>
> ---
>  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.
Previous: Philippe Blain via GitGitGadgetNext: Junio C Hamano
Message 3 of 11 in “Fix a few documentation errors around the raw diff output”
  1. 0/3 Fix a few documentation errors around the raw diff outputPhilippe Blain via GitGitGadget, Jun 13, 2022
  2. 1/3 diff-format.txt: fix ancient copy-paste errorPhilippe Blain via GitGitGadget, Jun 13, 2022
  3. Junio C HamanoJun 13, 2022
  4. Junio C HamanoJun 13, 2022
  5. Philippe BlainJun 14, 2022
  6. 2/3 diff-format.txt: correct misleading wordingPhilippe Blain via GitGitGadget, Jun 13, 2022
  7. Junio C HamanoJun 13, 2022
  8. Philippe BlainJun 14, 2022
  9. 3/3 diff-index.txt: update raw output format in examplesPhilippe Blain via GitGitGadget, Jun 13, 2022
  10. Junio C HamanoJun 13, 2022
  11. Junio C HamanoJun 13, 2022

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.