[PATCH] D24319: clang-format: Add a flag to limit git-clang-format's diff to a single commit

Luis Héctor Chávez via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 7 15:09:52 PDT 2016

lhchavez created this revision.
lhchavez added a reviewer: djasper.
lhchavez added subscribers: srhines, cfe-commits.
lhchavez set the repository for this revision to rL LLVM.
lhchavez added a project: clang-c.

When building pre-upload hooks using git-clang-format, it is useful to limit the scope to a single commit (instead of from a commit against the working tree) to allow for less false positives in dependent commits.

This change adds a flag (--single-commit) to git-clang-format, which uses a different strategy to diff (using git-diff-tree instead of git-diff-index) and create the temporary working tree (using the git hashes of the objects present in the specified commit instead of the ones found in the current working directory).




-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24319.70607.patch
Type: text/x-patch
Size: 4473 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160907/91e3686a/attachment.bin>

More information about the cfe-commits mailing list