I have a project with a rich git history from multiple users, it is never been auto-formatted and I'd like to run clang-format on it. It is important to preserve git history.
Some examples of what I mean.
When there was a block of code from Joe and then 'a+b' was converted to a + b
. It stays the Joe's line in git blame
.
When there was
void foo()
{
return k;
}
and it was formatted to
void foo() { return k; }
It still stays the Joe's code.
etc.
Any known solutions?