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

Re: [GSoC][PATCH] doc: fix doubled words in gitdiffcore documentation

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 28, 2026, 17:29 UTC
Message-ID
<87bjg7g8vw.fsf@gitster.g>
In-Reply-To
<CA+TqWtWiYR+aEsQPOsOwOonc2hinjfXW0oy5mLuDOPx4Xu9mwA@mail.gmail.com>
Noman <necrospre@gmail.com> writes:
Show 12 quoted lines
> diff --git a/Documentation/gitdiffcore.adoc b/Documentation/gitdiffcore.adoc
> index 642c51227b..2b3fd5a259 100644
> --- a/Documentation/gitdiffcore.adoc
> +++ b/Documentation/gitdiffcore.adoc
> @@ -133,7 +133,7 @@ input contained these filepairs:
>  :000000 100644 0000000... 0123456... A file0
>  ------------------------------------------------
>
> -and the contents of the deleted file fileX is similar enough to
> +and the contents of the deleted file X is similar enough to
>  the contents of the created file file0, then rename detection
>  merges these filepairs and creates:

Please pay attention to the line just before the pre-context of the above hunk, which says

    :100644 000000 0123456... 0000000... D fileX
and "the deleted file fileX" is a reference to it.

It indeed results in an awkward-sounding sentence, and I agree that it would have been better if we used sample filenames that sounded distinctly different from "file" 20 years ago when we wrote the first edition of this document, but that water under the bridge has poured out to the ocean long ago ;-)

In principle, I would not mind an update that consistently moves us away from file0, file1, ... to something else both in examples and explanations, but the cost of doing such a change and the cost of reviewing such a change to make sure no unintended mistakes sneak in, feels rather high, relative to the benefit. So, I dunno.

Show 12 quoted lines
> @@ -145,7 +145,7 @@ When the "-C" option is used, the original
> contents of modified files,
>  and deleted files (and also unmodified files, if the
>  "--find-copies-harder" option is used) are considered as candidates
>  of the source files in rename/copy operation.  If the input were like
> -these filepairs, that talk about a modified file fileY and a newly
> +these filepairs, that talk about a modified file Y and a newly
>  created file file0:
>
>  ------------------------------------------------
> --
> 2.45.1.windows.1
Previous: Noman
Message 2 of 2 in “doc: fix doubled words in gitdiffcore documentation”
  1. NomanMar 28, 2026
  2. Junio C HamanoMar 28, 2026

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.