> On Oct 30, 2017, at 8:40 AM, David Blaikie <dblai...@gmail.com> wrote: > > > > On Mon, Oct 23, 2017 at 5:01 PM George Karpenkov via Phabricator via > cfe-commits <cfe-commits@lists.llvm.org <mailto:cfe-commits@lists.llvm.org>> > wrote: > george.karpenkov added a comment. > > @dcoughlin the context I was thinking about is that if everyone consistently > runs `clang-format` (if we want that), then we never would have discussion. > The alternative is that every run of `clang-format` would be followed by > manually reverting changes which were introduced by mistake (in this case, > because the file was moved). > > clang-format has script (git-clang-format) for formatting only a diff, use > that or something like it so you're not reformatting unrelated lines. If > you're changing so much of the file, or it's so malformatted that local > format updates are going to be really inconsistent, reformat the entire file > in a standalone commit first, then submit your semantic changes separately.
But that’s what I was using: trouble is, the file got renamed, and clang-format then decided to reformat all of it. (and another question is whether it is a reasonable thing to do) > > (also there's a way to setup clang-format to "format changed lines on-save" > in vim, which is what I use - now I basically don't think about formatting :) > ) > > > > https://reviews.llvm.org/D39208 <https://reviews.llvm.org/D39208> > > > > _______________________________________________ > cfe-commits mailing list > cfe-commits@lists.llvm.org <mailto:cfe-commits@lists.llvm.org> > http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits > <http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits>
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits