Commit 84e32020e4d for woocommerce
commit 84e32020e4d9599cd40f27d791249154483de6b8
Author: Brandon Kraft <public@brandonkraft.com>
Date: Tue May 5 14:30:10 2026 -0500
Remove deprecated husky v8 headers from git hooks (#64607)
* Remove deprecated husky v8 header from post-merge hook
Husky v9.1.7 is installed and v10.0.0 will remove _/husky.sh entirely.
The two-line v8 header (shebang + 'husky.sh' source) is dead code
under v9 — husky runs hooks via its own wrapper at .husky/_/<hook>
which sources _/h and invokes the hook under sh -e — and will hard
fail in v10 once _/husky.sh is gone.
The remaining post-merge body uses only POSIX shell features and
continues to run correctly under sh -e.
* Remove deprecated husky v8 header from post-checkout and pre-push hooks
Same v9/v10 rationale as the post-merge cleanup in the previous
commit: husky runs hooks via its own wrapper at .husky/_/<hook>
under sh -e, so the v8 shebang + husky.sh source line is dead code
in v9 and will hard fail in v10 once _/husky.sh is removed.
The remaining hook bodies use only POSIX shell features.
diff --git a/.husky/post-checkout b/.husky/post-checkout
index 999beaa9bdd..da85c622530 100755
--- a/.husky/post-checkout
+++ b/.husky/post-checkout
@@ -1,6 +1,3 @@
-#!/usr/bin/env bash
-. "$(dirname "$0")/_/husky.sh"
-
# The hook documentation: https://git-scm.com/docs/githooks.html#_post_checkout
CHECKOUT_TYPE=$3
HEAD_NEW=$2
diff --git a/.husky/post-merge b/.husky/post-merge
index 70d18ddcc2c..226b937c324 100755
--- a/.husky/post-merge
+++ b/.husky/post-merge
@@ -1,6 +1,3 @@
-#!/usr/bin/env bash
-. "$(dirname "$0")/_/husky.sh"
-
# The hook documentation: https://git-scm.com/docs/githooks.html#_post_merge
# Auto-switch pnpm versions when pulled changes include pnpm version change.
diff --git a/.husky/pre-push b/.husky/pre-push
index e52fd7c5635..8df24a0381a 100755
--- a/.husky/pre-push
+++ b/.husky/pre-push
@@ -1,4 +1 @@
-#!/bin/sh
-. "$(dirname "$0")/_/husky.sh"
-
./bin/pre-push.sh