That said, sure, skip them if you're worried about the history getting messed up or use them more selectively.
edit:typo
I was very worried when we transitioned to git that history will not be preserved and tried to preserve it, but it proved too much hassle so I dropped it.
In fact that proved not to be a problem. Well, not a problem for me, since I remember all the history of the code and all the half forgotten half baked features and why they are there. But if I'm gone then yes, it's going to be a problem. It's in a dire need for a rewrite, but this has been postponed again and again.
I think after a year or so I realised that even bothering to -try- to use SourceSafe was largely silly, got permission to stop, and installed a CVS server on a dev box for my own use.
(yes I know the VCS server shouldn't really be on the dev box I could potentially trash, I didn't have another machine handy and it was still a vast improvement)
It's all about the team or organization and their laziness or non-laziness.
Not sure if I agree here or not - whilst yes, the history isn't there, if it's a small enough team you'll have a good guess at who wrote it.
Definitely found I've learnt the style of colleages so know who to ask just from the code outline.
Then again, I think most of the tells for that for me are around the sort of structure that would survive reformatting anyway.
(and, y'know, legacy stuff, everything's a bloody trade-off)
This is assuming Git of course, which is not a given at all for the average legacy c++ codebase.
See "git blame ignore revs file".
Intended use is exactly to ignore bulk changes like auto formatting.
man git-blame
git help blame
https://git-scm.com/docs/git-blame1. You're going to reformat it eventually anyway. You're just delaying things. The best time to plant a tree, etc.
2. If it's an old codebase and you're trying to understand some bit of code you're almost always going to have to walk through about 5 commits to get to the original one anyway. One extra formatting commit doesn't really make any difference.
Not saying that fixes decades of cruft because you shouldn't change files without good reason and non-white space formatting is not a good reason, but I'm mentioning it because I've seen people naively belief bullshit like "code is self explanatory" and "the reason is in the commit message"
Just comment your code folks, this becomes less of a problem
I guess if it splits or combines lines that could cause some noise if you really want the history of a single line... But that happens all the time, and I don't see how it would really prevent understanding the history. You can always do a blame on a range of lines.
Maybe I'm missing something though, genuinely curious for a concrete example where reformatting makes it hard to understand history!
Adding it will remove white space nitpicking from code review, even if it isn't perfect.