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

2021-10-30 Thread Erik Larsson via Phabricator via cfe-commits
ortogonal added a comment. @MyDeveloperDay Is everything okay with this? Can you help out with the next step in the process? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90996/new/ https://reviews.llvm.org/D90996

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

2021-10-21 Thread Erik Larsson via Phabricator via cfe-commits
ortogonal added inline comments. Comment at: clang/tools/clang-format/git-clang-format:140 if not opts.diff: die('--diff is required when two commits are given') else: lodato wrote: > Does there need to be an equivalent check that --staged requires

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

2021-10-21 Thread Erik Larsson via Phabricator via cfe-commits
ortogonal updated this revision to Diff 381269. ortogonal added a comment. Update description on function `compute_diff` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90996/new/ https://reviews.llvm.org/D90996 Files: clang/tools/clang-format/git

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

2021-10-21 Thread Erik Larsson via Phabricator via cfe-commits
ortogonal added a comment. Thanks for all your help (superfast as well) Yes I need help commiting. My name: Erik Larsson My email: karl.erik.lars...@gmail.com Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90996/new/ https://reviews.llvm.org/D9099

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

2021-10-21 Thread Erik Larsson via Phabricator via cfe-commits
ortogonal added a comment. Thanks for looking into this! The feature `--staged` adds the possibility to ONLY run clang format on what is staged. Lets say you have main.cpp where you have done two changes. You stage one of them using: $ git add -p main.cpp You now have a state were one of t

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

2021-10-20 Thread Erik Larsson via Phabricator via cfe-commits
ortogonal updated this revision to Diff 381150. ortogonal added a comment. Just refactor it to latest main. I hope this will re-trigger a new build so I can investigate if there are still tests that fail. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

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

2020-11-06 Thread Erik Larsson via Phabricator via cfe-commits
ortogonal created this revision. ortogonal added reviewers: klimek, Alexander-Shukaev, djasper. Herald added a project: clang. Herald added a subscriber: cfe-commits. ortogonal requested review of this revision. When running git-clang-format in a pre-commit hook it's very useful to be able to tel