From 1b06804e8caaa3194a4e704258f8f164d6337e3f Mon Sep 17 00:00:00 2001 From: "bert.hausmans" Date: Sun, 10 May 2026 22:01:00 +0200 Subject: [PATCH] fix(lefthook): serialize pre-push commands to avoid stdin deadlock MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Default parallel execution of sync-check and git-lfs commands within the pre-push hook deadlocks: both read from stdin (git pipes the push refspec to pre-push hooks), and two parallel readers never reach EOF. Add piped: true to force sequential execution. sync-check runs first (only inspects push_files via lefthook templating, doesn't actually consume stdin), then git-lfs runs second with clean stdin access. Observed during chore/test-infra-001 sprint: LFS upload completed 100% but pre-push hook hung indefinitely. Workaround was --no-verify; this commit removes the need for that. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- lefthook.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lefthook.yml b/lefthook.yml index ff45bb65..4b9f2fc9 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -17,6 +17,10 @@ post-commit: run: bash .githooks/post-commit pre-push: + # piped: true forces serial execution. Both sync-check and git-lfs + # read from stdin (git pipes the push refspec to pre-push hooks); + # default parallel execution deadlocks with two stdin readers. + piped: true commands: sync-check: run: bash .githooks/pre-push