[cfe-users] clang-format + git = clang-git
Blagovest Taskov
taskov at gmail.com
Fri Apr 11 04:07:02 PDT 2014
Hi.
I've started using clang-format and it is working really well.
But there is a problem. If I checkout a git file, format it, change a line
and push it back I would have taken the "ownership" of all lines of code
(at least in terms of git-blame). We are a lot of devs here and everybody
has his/her own "taste" about formatting.
It would be so great if git and clang-format were integrated (in lets say
something like clang-git).
The idea :
The source can be kept in the clang-git "format free" - probably only 1
very long line with all the source without any "extra" whitespace and
whatsoever. When the file is checked and opened in tool (patched vim,
notepad++, VS, etc), the tool converts the "format free" version of the
file using clang-format to a format the user wants. clang-git is
responsible for managing the "ownership", track and show changes (probably
using clang-diff :))).
Using setup like this everybody can use whatever format he likes without
messing with the code format
of his/her colleagues.
Thanks,
Bye.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-users/attachments/20140411/66c5f6f0/attachment.html>
More information about the cfe-users
mailing list