[PATCH] D129311: [clang-format] Update return code

Owen Pan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 7 15:32:36 PDT 2022


owenpan added inline comments.


================
Comment at: clang/tools/clang-format/git-clang-format:202
+    return print_diff(old_tree, new_tree)
   elif opts.diffstat:
+    return print_diffstat(old_tree, new_tree)
----------------



================
Comment at: clang/tools/clang-format/git-clang-format:204
+    return print_diffstat(old_tree, new_tree)
   else:
     changed_files = apply_changes(old_tree, new_tree, force=opts.force,
----------------
You can delete this line.


================
Comment at: clang/tools/clang-format/git-clang-format:539-540
   # filter.
-  subprocess.check_call(['git', 'diff', '--diff-filter=M', old_tree, new_tree,
-                         '--'])
+  subprocess.check_call(['git', 'diff', '--diff-filter=M',
+                        old_tree, new_tree, '--exit-code', '--'])
 
----------------
`--exit-code` is implied?


================
Comment at: clang/tools/clang-format/git-clang-format:551-558
+  subprocess.check_call(['git',
+                         'diff',
+                         '--diff-filter=M',
+                         '--stat',
+                         old_tree,
+                         new_tree,
+                         '--exit-code',
----------------



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129311/new/

https://reviews.llvm.org/D129311



More information about the cfe-commits mailing list