Let's say that I issue the following command:
git diff hash1 hash2 -- MyFile.java
If the versions of the file in the two hashes are identical, then git returns no output. That seems reasonable and expected. However, if instead I pass a bad filename like this:
git diff hash1 hash2 -- MyFile.javaaaa
instead of getting an error, git again returns no output. I know that this behavior isn't universal; there are other git commands that do complain about a bad filename. But that's not happening here. And it's a real problem, because I can't differentiate between the case where there really is no difference and the case where I've just fat fingered the filename.
This can't be right. What am I missing? Is there some setting I can change?