Exclude third_party from formatting third_party dependencies may not follow SwiftShader's style guide, so they should be excluded. The presence of this check is preventing me from updating SPIRV-tools in SwiftShader. Bug: chromium:543704 Change-Id: Ia2d3c804700a02e215c133699a3fc6316a2f8369
diff --git a/pre-commit b/pre-commit index 92a1229..a919c5e 100755 --- a/pre-commit +++ b/pre-commit
@@ -15,9 +15,9 @@ TMPDIR=$(mktemp -d -t gcp-$(date +%Y-%m-%d-%H-%M-%S)-XXXXXXXXXX) diffFile=$(mktemp gpc-XXXXXXXXX --tmpdir=$TMPDIR) -# Get every source file that's been added, changed, or modified in the -# current index. -FILES=$(git diff --cached --name-only --diff-filter=ACM | grep '\.cpp$\|\.hpp$\|\.h$\|\.c$') +# Get every non third-party source file that's been added, changed, or modified +# in the current index. +FILES=$(git diff --cached --name-only --diff-filter=ACM | grep -v third_party | grep '\.cpp$\|\.hpp$\|\.h$\|\.c$') # Checkout a copy of current index into TMPDIR. This is necessary so that we # only read the versions of files that are being committed, and not any changes