[PATCH] D33944: git-clang-format: Add --cached option to format index

2017-06-06 Thread Kevin Locke via Phabricator via cfe-commits
kevinoid created this revision. kevinoid added a project: clang-tools-extra. Add --cached option to git-clang-format which behaves analogously to the use of --cached for other git subcommands, by causing the operation to work against the index state rather than the working directory state. This

[PATCH] D34010: clang-format: Add --cached option to format index

2017-06-07 Thread Kevin Locke via Phabricator via cfe-commits
kevinoid created this revision. Add --cached option to git-clang-format which behaves analogously to the use of --cached for other git subcommands, by causing the operation to work against the index state rather than the working directory state. This can be particularly useful for hook scripts wh

[PATCH] D34010: clang-format: Add --cached option to format index

2017-06-07 Thread Kevin Locke via Phabricator via cfe-commits
kevinoid abandoned this revision. kevinoid added a comment. Meant to update diff for https://reviews.llvm.org/D33944. My mistake. Closing. https://reviews.llvm.org/D34010 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.or

[PATCH] D33944: git-clang-format: Add --cached option to format index

2017-06-07 Thread Kevin Locke via Phabricator via cfe-commits
kevinoid updated this revision to Diff 101799. kevinoid added a comment. Fixed handling of case when no formatting changes are made but `old_tree != new_tree` in `apply_changes`. https://reviews.llvm.org/D33944 Files: tools/clang-format/git-clang-format Index: tools/clang-format/git-clang-f