From dd48c259ad1852148460995fb8d0298ffbc75690 Mon Sep 17 00:00:00 2001 From: Lourival Vieira Neto Date: Sun, 22 Nov 2026 09:52:38 -0300 Subject: [PATCH] checks: pre-commit leaves a staged submodule out The gate lists the staged paths and holds a path under bin/ to a trailing blank line and a copyright header, so a submodule staged there, a project's mount moved or added, as Lunatik's bin/luaebpf is (luainkernel/lunatik#2598), was refused as a file missing its header, and git show of its path failed. --ignore-submodules=all leaves a gitlink out of the list, whose commit no gate here reads. Co-Authored-By: Claude Opus 5.5 --- tools/checks/pre-commit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/checks/pre-commit b/tools/checks/pre-commit index 07bcadc..4cf9fd1 100755 --- a/tools/checks/pre-commit +++ b/tools/checks/pre-commit @@ -20,7 +20,7 @@ if [ -n "$conflicted" ]; then exit 1 fi -staged=$(git diff --cached --name-only --diff-filter=ACM) +staged=$(git diff --cached --name-only --diff-filter=ACM --ignore-submodules=all) leaked=$(CHECK_STAGED=1 bash "$(dirname "$(readlink -f "$0")")/machine-leak.sh" $staged) if [ -n "$leaked" ]; then