lodato created this revision.
lodato added reviewers: djasper, klimek.
This feature had never worked at all because the code incorrectly used
<`commit2>` for both the "old" and "new", so the diff was always empty! Now we
correctly use `<commit1>` where we should and it works fine.
https://reviews.llvm.org/D41129
Files:
google3/third_party/llvm/llvm/tools/clang/tools/clang-format/git-clang-format
Index:
google3/third_party/llvm/llvm/tools/clang/tools/clang-format/git-clang-format
===================================================================
---
google3/third_party/llvm/llvm/tools/clang/tools/clang-format/git-clang-format
+++
google3/third_party/llvm/llvm/tools/clang/tools/clang-format/git-clang-format
@@ -153,7 +153,7 @@
# those files.
cd_to_toplevel()
if len(commits) > 1:
- old_tree = commits[1]
+ old_tree = commits[0]
new_tree = run_clang_format_and_save_to_tree(changed_lines,
revision=commits[1],
binary=opts.binary,
Index: google3/third_party/llvm/llvm/tools/clang/tools/clang-format/git-clang-format
===================================================================
--- google3/third_party/llvm/llvm/tools/clang/tools/clang-format/git-clang-format
+++ google3/third_party/llvm/llvm/tools/clang/tools/clang-format/git-clang-format
@@ -153,7 +153,7 @@
# those files.
cd_to_toplevel()
if len(commits) > 1:
- old_tree = commits[1]
+ old_tree = commits[0]
new_tree = run_clang_format_and_save_to_tree(changed_lines,
revision=commits[1],
binary=opts.binary,
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits