Is there a command/option/filter to discard the changes (via a checkout) on all the modified files whose changes only affect whitespace?
Alternatively, staging only files with non-whitespace changes (including staging their whitespace changes) would be fine.