aboutsummaryrefslogtreecommitdiff
path: root/dev/tools
diff options
context:
space:
mode:
Diffstat (limited to 'dev/tools')
-rwxr-xr-xdev/tools/should-check-whitespace.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/dev/tools/should-check-whitespace.sh b/dev/tools/should-check-whitespace.sh
index 8159506b41..d85d651070 100755
--- a/dev/tools/should-check-whitespace.sh
+++ b/dev/tools/should-check-whitespace.sh
@@ -2,4 +2,5 @@
# determine if a file has whitespace checking enabled in .gitattributes
-git check-attr whitespace -- "$1" | grep -q -v 'unspecified$'
+git ls-files --error-unmatch "$1" >/dev/null 2>&1 &&
+git check-attr whitespace -- "$1" | grep -q -v -e 'unset$' -e 'unspecified$'