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

2016-09-13 Thread Luis Héctor Chávez via cfe-commits
lhchavez marked 2 inline comments as done. Comment at: cfe/trunk/tools/clang-format/git-clang-format:323 @@ -312,1 +322,3 @@ +def create_tree_from_commit(commit, filenames): + """Create a new git tree with the given files from `commit`. lhchavez wrote: >

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

2016-09-12 Thread Luis Héctor Chávez via cfe-commits
lhchavez marked 3 inline comments as done. Comment at: cfe/trunk/tools/clang-format/git-clang-format:93 @@ -92,1 +92,3 @@ help='default commit to use if none is specified'), + p.add_argument('--single-commit', action='store_true', + help=('run

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

2016-09-12 Thread Luis Héctor Chávez via cfe-commits
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

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

2016-09-12 Thread Mark Lodato via cfe-commits
lodato added a subscriber: lodato. lodato added a comment. Hi lhchavez, This patch does not work as intended. If I understand correctly, you want to see if a given `` has any clang-format problems. However: 1. This patch only computes `changed_lines` from `` but then runs clang-format on the

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

2016-09-07 Thread Luis Héctor Chávez via cfe-commits
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