From 415b424244b680fd0804723c92ba6ee48bdfa2bc Mon Sep 17 00:00:00 2001 From: eth0net Date: Wed, 30 Sep 2026 12:46:18 +0100 Subject: [PATCH] build: the Windows name check runs where there are names to check With no stages it also runs at commit-msg, and the only path handed to it there is the message. From a linked worktree that path climbs out of the checkout, so the hook refuses it and no commit from a worktree can land. Signed-off-by: eth0net --- prek.toml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/prek.toml b/prek.toml index 38a616a..5242e4a 100644 --- a/prek.toml +++ b/prek.toml @@ -18,7 +18,10 @@ hooks = [ { id = "check-merge-conflict" }, { id = "check-case-conflict" }, # Windows is a CI platform, so a path that can't exist there fails there. - { id = "check-illegal-windows-names" }, + # Pinned to pre-commit: with no stages it also runs at commit-msg, where the + # only path it is handed is the message, and from a worktree that path + # climbs out of the checkout and it refuses its own repository. + { id = "check-illegal-windows-names", stages = ["pre-commit"] }, { id = "check-added-large-files" }, { id = "check-toml" }, { id = "check-yaml" }, -- 2.54.0