[glib: 2/3] clang-format-diff: Output diff for multiple files, not just one



commit 9ec69ae6af549da334fe22e55f3b4a6a94c86c5b
Author: Philip Withnall <withnall endlessm com>
Date:   Thu Dec 12 09:56:17 2019 +0000

    clang-format-diff: Output diff for multiple files, not just one
    
    A bug in `clang-format-diff.py` was causing it to only output the
    formatting diff for the first incorrectly-formatted file, rather than
    the diffs for all files.
    
    That’s not so helpful for reformatting an entire MR in one go. Fix it.
    
    Signed-off-by: Philip Withnall <withnall endlessm com>

 clang-format-diff.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/clang-format-diff.py b/clang-format-diff.py
index 535f285dd..3fb776c59 100755
--- a/clang-format-diff.py
+++ b/clang-format-diff.py
@@ -125,8 +125,8 @@ def main():
             if diff_string:
                 format_line_counter += sys.stdout.write(diff_string)
 
-        if format_line_counter > 0:
-            sys.exit(1)
+    if format_line_counter > 0:
+        sys.exit(1)
 
 
 if __name__ == '__main__':


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]