aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/dockerfile/grpc_clang_format
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-02-18 07:14:37 -0800
committerGravatar Craig Tiller <ctiller@google.com>2016-02-18 07:14:37 -0800
commit16f6826ffda41ffa7bcb7fcd4bc35916875af55c (patch)
tree81cddaa0db36b0b5d495220ca4a3df9347f27d24 /tools/dockerfile/grpc_clang_format
parentddcc39267089a4886c420af8776e572f24714cbb (diff)
parentc15cd723ebabbab4825480032b56a2ddd9a8b76b (diff)
Merge github.com:grpc/grpc into fix-proto-docker
Diffstat (limited to 'tools/dockerfile/grpc_clang_format')
-rwxr-xr-xtools/dockerfile/grpc_clang_format/clang_format_all_the_things.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/dockerfile/grpc_clang_format/clang_format_all_the_things.sh b/tools/dockerfile/grpc_clang_format/clang_format_all_the_things.sh
index af0b22a07f..d56bc01831 100755
--- a/tools/dockerfile/grpc_clang_format/clang_format_all_the_things.sh
+++ b/tools/dockerfile/grpc_clang_format/clang_format_all_the_things.sh
@@ -48,6 +48,12 @@ do
done
done
+# The CHANGED_FILES variable is used to restrict the set of files to check.
+# Here we set files to the intersection of files and CHANGED_FILES
+if [ -n "$CHANGED_FILES" ]; then
+ files=$(comm -12 <(echo $files | tr ' ' '\n' | sort -u) <(echo $CHANGED_FILES | tr ' ' '\n' | sort -u))
+fi
+
if [ "x$TEST" = "x" ]
then
echo $files | xargs $CLANG_FORMAT -i