- User Since
- Feb 9 2016, 7:13 AM (188 w, 5 d)
Dec 13 2017
Update after change to D41145 that fixed len(commits) > 2 case.
Oops! Fixed. Thanks for catching this!
Re-add check for len(commits) > 2.
Dec 12 2017
Oh, and I meant to start with: I'm so sorry for the extremely long delay. I was swamped with work before then I forgot about this. Please know that I appreciate your effort here and that I didn't mean to blow you off.
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.
Yeah, I was incorrect. The feature worked fine. I don't know what I was thinking.
Actually the old code might have been working fine. Please hold off on reviewing.
Aug 30 2017
Sorry, I have been very busy with other work so I haven't had a chance to follow along. (I don't work on LLVM team - I just contributed this script.)
Dec 13 2016
I know nothing about the C++ code. I only know the git-clang-format script.
Nov 3 2016
Thanks for the fix!
Oct 3 2016
Sep 21 2016
Nice feature. Thanks for the patch!
Sep 20 2016
Could you add a note to the commit description to say that there is a backwards incompatibility: if a filename matches a branch name or other commit-ish, then git clang-format <commit> <file> will no longer work as expected; use git clang-format <commit> -- <file> instead.
Sep 19 2016
Sorry for the delay - I haven't had a chance to review. I'll be sure to review by tomorrow. Thanks for the updates!
Sep 12 2016
Feb 9 2016
This does not work properly because it calls clang-format on the files in the working directory, even if --staged is given. To fix, you need to somehow pass in the version of the files in the index into clang-format. To do that, I think you'd want to pass in the blob via stdin and add -assume-filename=... to the command line.