4

I often have lots of whitespace-only changes (spaces turning to tabs or vice versa etc.) and I generally don't care about these changes. I know that whitespace could be important (i.e. some whitespace changes can be breaking), but it would be very useful if there was a way to tell when looking at huge lists of files which ones contain whitespace changes only.

Please I am not looking for the "you should never have that many files to check in" kind of response, I'm aware of that already - this is just the situation and I'd like some advice!

Thanks.

alt text

4 Answers 4

4

I know this is an old post but I just ran into a similar situation. What I did was use TortoiseSVN's "Create Patch" feature and selected "Ignore whitespace changes" in the options window. Then I just reverted the working directory to the trunk, applied the patch, and committed.

0

I don't think you can. You should probably relegate them to different commits. I.E. have one commit that contains all the whitespace/formatting changes with a comment to that effect then another that contains the actual code/logic changes.

4
  • The only problem with that is that the whitespace changes sneak up on us, so if we did them very consciously and separately this would work, but alas this is not the case!
    – joshcomley
    Sep 6, 2010 at 9:24
  • Before checking in, we always review each changed file, by viewing the diffs. Then, if we find one that's whitespace-only, we either revert it, or commit it separately from the others. Sep 6, 2010 at 10:04
  • @Roger, I agree. It's a pain admittedly, but without SVN having knowledge of every language it'd be hard for it to tell what is and isn't a significant change.
    – Dave D
    Sep 6, 2010 at 10:13
  • @Roger + @Dave - this is exactly what we're currently doing, but there's often a whole lotta files!
    – joshcomley
    Sep 6, 2010 at 10:49
0

Concluded it can't be done :(

0
0

What about pre-commit hook changing tabs to spaces? :) That way will the checkouted files always with spaces ;)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.