[PATCH] D90996: [clang-format] Add --staged/--cached option to git-clang-format

2021-10-26 Thread Mark Lodato via Phabricator via cfe-commits
lodato accepted this revision. lodato added a comment. This revision is now accepted and ready to land. Oops, I'm sorry. I meant to test it but ran out of time and then forgot to click approve. My apologies. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D90996: [clang-format] Add --staged/--cached option to git-clang-format

2021-10-21 Thread Mark Lodato via Phabricator via cfe-commits
lodato requested changes to this revision. lodato added a comment. This revision now requires changes to proceed. Thanks for pushing this through, @ortogonal! The change LGTM, except the two minor issues listed. Name: Mark Lodato Email: lod...@google.com Comment at:

[PATCH] D41147: git-clang-format: Add new --staged option.

2017-12-13 Thread Mark Lodato via Phabricator via cfe-commits
lodato updated this revision to Diff 126793. lodato added a comment. Update after change to https://reviews.llvm.org/D41145 that fixed `len(commits) > 2` case. https://reviews.llvm.org/D41147 Files: google3/third_party/llvm/llvm/tools/clang/tools/clang-format/git-clang-format Index:

[PATCH] D41145: git-clang-format: refactor to support upcoming --staged flag

2017-12-13 Thread Mark Lodato via Phabricator via cfe-commits
lodato added a comment. Oops! Fixed. Thanks for catching this! https://reviews.llvm.org/D41145 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D41145: git-clang-format: refactor to support upcoming --staged flag

2017-12-13 Thread Mark Lodato via Phabricator via cfe-commits
lodato updated this revision to Diff 126792. lodato added a comment. Re-add check for `len(commits) > 2`. https://reviews.llvm.org/D41145 Files: google3/third_party/llvm/llvm/tools/clang/tools/clang-format/git-clang-format Index:

[PATCH] D15465: [git-clang-format]: New option to perform formatting against staged changes only

2017-12-12 Thread Mark Lodato via Phabricator via cfe-commits
lodato added a comment. 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. Best regards, Mark Repository: rL LLVM

[PATCH] D15465: [git-clang-format]: New option to perform formatting against staged changes only

2017-12-12 Thread Mark Lodato via Phabricator via cfe-commits
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

[PATCH] D41147: git-clang-format: Add new --staged option.

2017-12-12 Thread Mark Lodato via Phabricator via cfe-commits
lodato created this revision. lodato added reviewers: djasper, klimek, Alexander-Shukaev. This new mode, which requires --diff, operates very similarly to the two mode, except that the stage is formatted instead of the second commit. The main intent of this feature is to use in pre-commit

[PATCH] D41145: git-clang-format: refactor to support upcoming --staged flag

2017-12-12 Thread Mark Lodato via Phabricator via cfe-commits
lodato created this revision. lodato added reviewers: djasper, klimek, Alexander-Shukaev. The only user-visible change is rewriting of the --help message to make the different modes more clear. Internally, this is a significant refactoring to make the source and destination of the diff to be

[PATCH] D41129: Fix `git-clang-format `.

2017-12-12 Thread Mark Lodato via Phabricator via cfe-commits
lodato added a comment. Yeah, I was incorrect. The feature worked fine. I don't know what I was thinking. https://reviews.llvm.org/D41129 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D41129: Fix `git-clang-format `.

2017-12-12 Thread Mark Lodato via Phabricator via cfe-commits
lodato added a comment. Actually the old code might have been working fine. Please hold off on reviewing. https://reviews.llvm.org/D41129 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D41130: git-clang-format: cleanup: Use run() when possible.

2017-12-12 Thread Mark Lodato via Phabricator via cfe-commits
lodato created this revision. lodato added reviewers: djasper, klimek. This makes the code a bit easier to understand. Also add a docstring to `run()`. Note: This means that we read the entire index into memory when calling `git update-index`, whereas previously we would send the data

[PATCH] D41129: Fix `git-clang-format `.

2017-12-12 Thread Mark Lodato via Phabricator via cfe-commits
lodato created this revision. lodato added reviewers: djasper, klimek. This feature had never worked at all because the code incorrectly used <`commit2>` for both the "old" and "new", so the diff was always empty! Now we correctly use `` where we should and it works fine.

[PATCH] D15465: [git-clang-format]: New option to perform formatting against staged changes only

2017-08-30 Thread Mark Lodato via Phabricator via cfe-commits
lodato added a comment. 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.) I'll try to carve out some time to review within the next week. Repository: rL LLVM https://reviews.llvm.org/D15465

[PATCH] D27377: clang-format: Support the Java 8 'default' method modifier

2016-12-13 Thread Mark Lodato via Phabricator via cfe-commits
lodato resigned from this revision. lodato removed a reviewer: lodato. lodato added a comment. I know nothing about the C++ code. I only know the git-clang-format script. https://reviews.llvm.org/D27377 ___ cfe-commits mailing list