aboutsummaryrefslogtreecommitdiff
path: root/util/lint/lint-stable-021-coreboot-lowercase
diff options
context:
space:
mode:
Diffstat (limited to 'util/lint/lint-stable-021-coreboot-lowercase')
-rwxr-xr-xutil/lint/lint-stable-021-coreboot-lowercase4
1 files changed, 3 insertions, 1 deletions
diff --git a/util/lint/lint-stable-021-coreboot-lowercase b/util/lint/lint-stable-021-coreboot-lowercase
index 82e2dd4160..a71d2047f3 100755
--- a/util/lint/lint-stable-021-coreboot-lowercase
+++ b/util/lint/lint-stable-021-coreboot-lowercase
@@ -19,7 +19,9 @@ LC_ALL=C export LC_ALL
EXCLUDE='^3rdparty/\|util/crossgcc/xgcc\|Binary file\|coreboot\|COREBOOT\|CorebootPayload\|CorebootModule\|minnowboard.org/Coreboot\|.*\.patch$\|CorebootBdsLib\|^payloads/external'
# Use git grep if the code is in a git repo, otherwise use grep.
-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
GREP_FILES="git grep -in"
# Check last commit message