aboutsummaryrefslogtreecommitdiff
path: root/util/lint/lint-stable-018-symlinks
diff options
context:
space:
mode:
Diffstat (limited to 'util/lint/lint-stable-018-symlinks')
-rwxr-xr-xutil/lint/lint-stable-018-symlinks4
1 files changed, 3 insertions, 1 deletions
diff --git a/util/lint/lint-stable-018-symlinks b/util/lint/lint-stable-018-symlinks
index 833507c294..6f58e7ddd0 100755
--- a/util/lint/lint-stable-018-symlinks
+++ b/util/lint/lint-stable-018-symlinks
@@ -19,7 +19,9 @@ LC_ALL=C export LC_ALL
EXCLUDED_DIRS='^3rdparty\|^site-local'
# If the code is in a git repo, only print files that are checked in
-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
git ls-tree -r HEAD | \
grep ^120000 | \
cut -f2 | \