[PATCH v2 2/4] scripts/misc-check: add double-quotes to satisfy shellcheck

From: Masahiro Yamada
Date: Sun Jun 01 2025 - 09:32:51 EST


In scripts/misc-check line 8:
git -C ${srctree:-.} ls-files -i -c --exclude-per-directory=.gitignore 2>/dev/null |
^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Signed-off-by: Masahiro Yamada <masahiroy@xxxxxxxxxx>
---

Changes in v2:
- New patch

scripts/misc-check | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/misc-check b/scripts/misc-check
index f37b2f6931cc..21551d721079 100755
--- a/scripts/misc-check
+++ b/scripts/misc-check
@@ -5,7 +5,7 @@ set -e

# Detect files that are tracked but ignored by git.
check_tracked_ignored_files () {
- git -C ${srctree:-.} ls-files -i -c --exclude-per-directory=.gitignore 2>/dev/null |
+ git -C "${srctree:-.}" ls-files -i -c --exclude-per-directory=.gitignore 2>/dev/null |
sed 's/$/: warning: ignored by one of the .gitignore files/' >&2
}

--
2.43.0