diff options
Diffstat (limited to 'util/lint/lint-stable-018-symlinks')
-rwxr-xr-x | util/lint/lint-stable-018-symlinks | 4 |
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 | \ |