fix(lefthook): serialize pre-push commands to avoid stdin deadlock
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)
This commit is contained in:
@@ -17,6 +17,10 @@ post-commit:
|
|||||||
run: bash .githooks/post-commit
|
run: bash .githooks/post-commit
|
||||||
|
|
||||||
pre-push:
|
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:
|
commands:
|
||||||
sync-check:
|
sync-check:
|
||||||
run: bash .githooks/pre-push
|
run: bash .githooks/pre-push
|
||||||
|
|||||||
Reference in New Issue
Block a user