> Von: Konstantin Kolinko [mailto:knst.kolinko_at_gmail.com]
> > While Subversion and TortoiseSVN offer the possibility to ignore
> > white space changes when diffing the files, a commit still includes
> > those changes, and thus the diff in the SVN history is cluttered,
> > which causes problems for reviewers.
> Maybe you can fine-tune the tools that are being used for the review?
Most people usually use TortoiseDiff for the review - but they get
suspicious when one tells them to check one of the "ignore"-Flags. :-)
> > Is there any tool which reverts all those whitespace-only changes,
> > keeping only the "real" changes in the file?
> I think that you can generate two diffs, one with all the changes and
> second one with non-whitespace ones.
> Then, use the first diff to undo the changes and the second one to
I think that idea could work, I'll see whether I can come up with a
script doing that.
However, I wonder why - seemingly - no one else ever needed such a
script and provided it to the community.
> > (I know that a project-wide style guide and rejecting commits which
> > not conform to that style guide are the long term solution to that
> > problem, and we're aiming towards that.)
> A good policy is to educate the developers to commit whitespace-only
> changes in a separate commit.
I know that. And I'm searching for a tool allowing me to do just that.
Especially when you make a self-contained change (e. G. pure addition of
new methods or a new class, not touching any existing code pathes) to a
large "legacy" code file, and accidentally hit "Reformat code" in
ignorance of the fact that this file does not yet conform to the style
guide, you're busted.
Received on 2011-06-14 16:33:26 CEST