like the inverse of git diff --name-only
2 Answers
You can do this by looking at unique values from ls-tree and diff with the --name-only options (done in one line so it's easier to search and use from history later):
cat <(git ls-tree --name-only -r HEAD) <(git diff --name-only HEAD^ HEAD) | sort | uniq -u In the example, the 2 revisions are HEAD and HEAD^. This produces no side effect output files.