MyDeveloperDay added a comment. So trying to understand the problem statement, is it:
1. you have some files staged 2. and then you have to change them locally (review comment) 3. but forget to git add them, 4. you run git clang-format --staged 5. and it formats the new file (not added) based on the line numbers that are changing in the already staged file, which could be a different range to the original (is that correct?) 6. You think you've formatted the new file correctly (but likely missed a line or two) 7. You perform git add (as you now notice you've missed adding it) 8. You commit, but a commit hook tells you that you didn't clang format. (or worse still you are able to commit and push but you are pushing a badly formatted file, potentially) is that correct? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130108/new/ https://reviews.llvm.org/D130108 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits