]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Avoid \0 delimeter
authorMatthias Maier <tamiko@43-1.org>
Fri, 15 Jun 2018 05:20:49 +0000 (00:20 -0500)
committerMatthias Maier <tamiko@43-1.org>
Fri, 15 Jun 2018 05:22:51 +0000 (00:22 -0500)
We actually do not need any \0 delimeter because '\n' is an invalid
character in file names. So, simply switch to '\n' delimeted output.
This helps with Mac OS X compatibility because there grep might not have
the -z (--null-data) option and can thus not correctly match null
terminated input...

contrib/utilities/indent_common.sh

index ea44416af26f498c4fd84c3fe218672e4ebbd519..0d1f209ceadd34cee14808fc2cdf709ca386a408 100644 (file)
@@ -189,9 +189,9 @@ process_changed()
 {
   LAST_MERGE_COMMIT="$(git log --format="%H" --merges --max-count=1 master)"
 
-  ( git ls-files -z --others --exclude-standard -- ${1};
-    git diff -z --name-only $LAST_MERGE_COMMIT -- ${1} )|
-      sort -zu |
-      grep -zE "^${2}$" |
-      xargs --no-run-if-empty -0 -n 1 -P 10 -I {} bash -c "${3} {}"
+  ( git ls-files --others --exclude-standard -- ${1};
+    git diff --name-only $LAST_MERGE_COMMIT -- ${1} )|
+      sort -u |
+      grep -E "^${2}$" |
+      xargs --no-run-if-empty -d '\n' -n 1 -P 10 -I {} bash -c "${3} {}"
 }

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.