Somewhere on Shadow Earth, at Wed, Jan 12, 2011 at 03:00:54PM +0000, Matthew King wrote: > GNU diff has an option described thusly: > > -I RE --ignore-matching-lines=RE > Ignore changes whose lines all match RE. > > Fantastic, says you, now I can compare two files and see only if > lines which aren't comments differ by telling diff to ignore lines > which begin with a '#'. > > No, says GNU, that is useful functionality which would be the > logical extension of *all* the other 'ignore' options diff accepts. > What -I RE will do instead is indicate that *the entire file* does > not differ iff *all differing lines* match the regular expression. > In the highly likely situation that lines which match your > expression differ *and* lines which don't match differ, you will see > every line of difference, whether it matches or not. > > Hate.
Bonus hate: When I am refactoring software, I will sometimes rename a variable or function or what-have-you. Before I submit the code to my source repository, I'd like to ensure that I am not picking up any stray diffs (debugging changes, forgot to sync before checkin, etc). It would be awfully nice if diff gave one the ability to say, in essence, take one of the files, and notionally perform the following substitution, then diff the resultant with the other file. In other words, only show me the diffs I don't recall making. HATE! -- Timothy Knox <mailto:t...@thelbane.com> "Any nitwit can understand computers, and many do." -- Ted Nelson