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

Re: bug - git version 2.20.1.windows.1

From
Jeff King <peff@peff.net>
Date
Feb 22, 2019, 14:10 UTC
Message-ID
<20190222141030.GA3272@sigill.intra.peff.net>
In-Reply-To
<CAM3o+_mX6euHa8Trq5cArcYBc9Wm0FH2L56S6Z3ojdhTcc0CWQ@mail.gmail.com>
On Fri, Feb 22, 2019 at 02:26:51PM +0100, Krzysztof Sobierajczyk wrote:
Show 9 quoted lines
> ksobierajczyk@KME43 MINGW64 /d/Simple repository (master)
> $ git status
> On branch master
> Changes to be committed:
>   (use "git reset HEAD <file>..." to unstage)
> 
>         renamed:    to remove.txt -> new name.txt
>                      <------------  AND FAIL
>         deleted:    to rename.txt

Git doesn't store rename information; it infers it when generating a diff (and the output from git-status here is a diff between HEAD and the index).

If "to remove" and "to rename" contain identical data, then they are equally valid candidates, and Git has to pick one. In this case it picked the one you didn't expect.

-Peff
Previous: Krzysztof Sobierajczyk
Message 2 of 2 in “bug - git version 2.20.1.windows.1”
  1. Krzysztof SobierajczykFeb 22, 2019
  2. Jeff KingFeb 22, 2019

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.