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

Kevin Locke via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 7 12:55:08 PDT 2017


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 which need to check or
change the formatting of the index state before commit.

Patch by Kevin Locke.


https://reviews.llvm.org/D34010

Files:
  tools/clang-format/git-clang-format

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34010.101798.patch
Type: text/x-patch
Size: 6295 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170607/a6224582/attachment-0001.bin>


More information about the cfe-commits mailing list