summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-10-04 13:46:31 +0000
committerKitware Robot <kwrobot@kitware.com>2017-10-04 09:46:40 -0400
commite2f05c731017a3826b0a185e2fc186e61db30849 (patch)
tree1aab9a805e16eef8b90e87d248fd3df0b08d2629
parent0e1ef0ca397db5f0292a218dadc997a7690205cd (diff)
parent574d694337213da88ded3380cce91ae9478fb579 (diff)
downloadcmake-e2f05c731017a3826b0a185e2fc186e61db30849.tar.gz
Merge topic 'clang-format'
574d6943 clang-format.bash: minor fixes to support MacOS Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1339
-rwxr-xr-xUtilities/Scripts/clang-format.bash6
1 files changed, 4 insertions, 2 deletions
diff --git a/Utilities/Scripts/clang-format.bash b/Utilities/Scripts/clang-format.bash
index 428a9e48fe..3b331a18f4 100755
--- a/Utilities/Scripts/clang-format.bash
+++ b/Utilities/Scripts/clang-format.bash
@@ -111,7 +111,9 @@ $git_ls |
# Select sources with our attribute.
git check-attr --stdin format.clang-format |
- sed -n '/: format\.clang-format: set$/ {s/:[^:]*:[^:]*$//p}' |
+ grep -e ': format\.clang-format: set$' |
+ sed -n 's/:[^:]*:[^:]*$//p' |
# Update sources in-place.
- xargs -d '\n' "$clang_format" -i
+ tr '\n' '\0' |
+ xargs -0 "$clang_format" -i