git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* --diff-filter could use option for pre-rename files
@ 2018-05-18 18:13 Nathan Bush
  0 siblings, 0 replies; only message in thread
From: Nathan Bush @ 2018-05-18 18:13 UTC (permalink / raw)
  To: git

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-05-18 18:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-18 18:13 --diff-filter could use option for pre-rename files Nathan Bush

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).