From 2bde7711073802ac3d6a4d79ba4a3064beba5d8c Mon Sep 17 00:00:00 2001 From: VinPropane Date: Sun, 31 May 2026 19:46:51 -0400 Subject: [PATCH] =?UTF-8?q?chore:=20pre-push=20hook=20bash=203.2=20?= =?UTF-8?q?=E2=80=94=20no=20local=20outside=20functions.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/git-hooks/pre-push | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/git-hooks/pre-push b/scripts/git-hooks/pre-push index 281e035..16481c4 100755 --- a/scripts/git-hooks/pre-push +++ b/scripts/git-hooks/pre-push @@ -31,9 +31,9 @@ while read -r local_ref local_sha remote_ref remote_sha; do continue fi - local range="" + range="" if [[ "$remote_sha" == "$zero_sha" ]]; then - local base="" + base="" if git show-ref --verify --quiet refs/remotes/origin/main; then base="$(git merge-base origin/main "$local_sha" 2>/dev/null || true)" fi @@ -54,9 +54,8 @@ done # Fallback when stdin is empty (non-standard invocations). if [[ "$read_any_ref" == false ]]; then - local head_sha head_sha="$(git rev-parse HEAD)" - local base="" + base="" if git show-ref --verify --quiet refs/remotes/origin/main; then base="$(git merge-base origin/main "$head_sha" 2>/dev/null || true)" fi