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

diff-filter=R can't identify renaming if not done directly

From
SSSofia Syrianidou <sofia.syrianidou@suse.com>
Date
Dec 4, 2020, 14:37 UTC
Message-ID
<19eb8038-20d6-385f-50e5-26c7a0bd8e90@suse.com>

Hello, quick question about using diff-filter in linux. In the scenario that in my repository, I first copy file1 to file2, then move file2 to file3 and delete file1, "git diff" returns

diff --git a/file1 b/file3

similarity index 100%

rename from file 1

rename to file3


  but running "git diff --diff-filter=r" doesn't return anything. Only
flag T will return the change. Can this be considered as a bug?
Next: Junio C Hamano
Message 1 of 2 in “diff-filter=R can't identify renaming if not done directly”
  1. Sofia SyrianidouDec 4, 2020
  2. Junio C HamanoDec 4, 2020

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.