summaryrefslogtreecommitdiff
path: root/util/lint/lint-016-non-ascii
diff options
context:
space:
mode:
Diffstat (limited to 'util/lint/lint-016-non-ascii')
-rwxr-xr-xutil/lint/lint-016-non-ascii4
1 files changed, 3 insertions, 1 deletions
diff --git a/util/lint/lint-016-non-ascii b/util/lint/lint-016-non-ascii
index 881eeba69e..beffd83dd6 100755
--- a/util/lint/lint-016-non-ascii
+++ b/util/lint/lint-016-non-ascii
@@ -22,7 +22,9 @@ EXCLUDED_FILES='to-wiki/towiki\.sh$\|vga/vga_font\|video/font\|PDCurses.*x11'
EXCLUDED_PHRASES='Copyright\|Ported to\|Intel®\|°C\|°F\|Athlon™\|Copyright.*©\|A-Za-zÀ-ÿ'
# Use git ls-files if the code is in a git repo, otherwise use find.
-if [ -n "$(command -v git)" ] && [ -d .git ]; then
+if [ -n "$(command -v git)" ] && \
+ [ "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ]
+then
FIND_FILES="git ls-files"
else
FIND_FILES="find . "