This is an archive of the discontinued LLVM Phabricator instance.

clang-format: Add --cached option to format index
AbandonedPublic

Authored by kevinoid on Jun 7 2017, 12:55 PM.

Details

Reviewers
djasper
srhines
Summary

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.

Event Timeline

kevinoid created this revision.Jun 7 2017, 12:55 PM
kevinoid abandoned this revision.Jun 7 2017, 12:56 PM

Meant to update diff for D33944. My mistake. Closing.