I want to retrieve a list of all the files that really changed between two commits. So, I want to ignore files where the only things that changed are part of the following list:
- empty line added / removed
- line containing just an
*
(and possibly whitespace) added / removed - indentation changed or whitespace added after lines
- breaks inserted into any line, e.g.:
Before:
System.out.println("bar" + "foo");
After:
System.out.println("bar" +
"foo");
These kinds of changes should be ignored. I know that this may be a very complicated task, but I don't think I'm the first person needing this kind of thing.
Update
After some help in the comments I came up with
git diff --word-diff-regex='^\*|[^[:space:]]' --ignore-space-at-eol --ignore-blank-lines --ignore-space-change --ignore-all-space hash1..hash2 --name-only
But I am not quite sure if that actually does everything I want. Can someone verify that?