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

--diff-filter could use option for pre-rename files

From
NBNathan Bush <nathan@newshubmedia.com>
Date
May 18, 2018, 18:13 UTC
Message-ID
<278e5e56-f031-5e84-67ac-315b38f1b64c@newshubmedia.com>
I've been trying to hook together a build script and a GIT repo.
At one points it makes the following calls:

git diff --find-copies-harder --find-renames=101% --name-only --diff-filter=ACMRT 'refs/tags/0.0.25' 'refs/tags/0.0.27' > modified.txt git diff --find-copies-harder --find-renames=101% --name-only --diff-filter=D 'refs/tags/0.0.25' 'refs/tags/0.0.27' > deleted.txt

If a file was renamed, but otherwise unchanged (and needs to be deleted by the build script), the files' original name does not appear on either list. Or, as far as I can tell, at all.

My current scripted workaround is something like

older = `git ls-tree --name-only --full-tree -r 'refs/tags/0.0.25'` newer = `git ls-tree --name-only --full-tree -r 'refs/tags/0.0.27'` deleted = older - newer (puts deleted in deleted.txt)

Ideally this would just be a diff-filter option, say, --diff-filter=DE
-Nathan Bush
Message 1 of 1 in “--diff-filter could use option for pre-rename files”
  1. Nathan BushMay 18, 2018

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.