The problem is not the diff but the "and besides that".<p>You should make two different commits, changing indentation and changing a feature are different changes and should be tracked independently.
Or use a diff tool that can do this automatically..? [1] Diff without the ability to edit the changes you see is only about 10% as useful as the ability to edit those diffs inline, change how it's decided to compare the two (or three) files (match THIS line with THIS OTHER line...), or trivially revert the changes a line at a time. [2]<p>I hop back and forth between GUI-based editors and the command line. Some things are just better in a GUI, and diff is one of those things--especially any nontrivial diff.<p>[1] <a href="http://www.scootersoftware.com/" rel="nofollow">http://www.scootersoftware.com/</a><p>[2] I'm sure you can do this in vi and/or emacs as well. I leave how to do that as an exercise to the reader.
On Mercurial, all of those options are just "hg diff -w".<p>You can also ignore whitespace when picking commits apart with hg record (akin to git add -p, I think).
I'd really like a diff option that ignores changes that don't alter the AST.<p>That's pretty outside the scope of git diff or gnu diff, though.