[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
Mon Sep 12 21:14:14 PDT 2016


lhchavez updated this revision to Diff 71103.
lhchavez added a comment.

Using lodato's proposed interface. This patch:

- Accepts an arbitrary number of commits as arguments. Validation will be done in main(), such that two commits are valid only when running in --diff mode.
- Allows diffing two commits against each other in addition to diffing against the working directory (still using git diff-tree). The previous version didn't really work with merge-commits anyways.
- Runs clang-format against the file in the working directory (if a single commit is passed), or against the second commit.


https://reviews.llvm.org/D24319

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24319.71103.patch
Type: text/x-patch
Size: 10700 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160913/5eb9d70b/attachment.bin>


More information about the cfe-commits mailing list