[PATCH] D15465: [git-clang-format]: New option to perform formatting against staged changes only
Mark Lodato via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 12 17:43:25 PST 2017
lodato added a comment.
I think the simplest solution to those problems is to require `--diff`. An alternative is to write the changes directly to the index without touching the working directory, but that would require some flag because the behavior is unintuitive, and the implementation would be complicated enough to warrant its own patch.
I reimplemented your patch in https://reviews.llvm.org/D41147 based on a significant refactoring, which I hope makes the code more clear.
More information about the cfe-commits