From ee3f24486307b84e95cdcf3a2545815cdd47986d Mon Sep 17 00:00:00 2001 From: Zoran Regvart Date: Wed, 29 May 2024 14:15:15 +0200 Subject: [PATCH] Unconditionally remove the temp branch With `advice.forceDeleteBranch` set to true (default) the branch will not be removed using `git branch --delete`, it will be removed using `git branch -D` though. --- hack/test-shellspec.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/test-shellspec.sh b/hack/test-shellspec.sh index 8cd56074a3..72a27c8df1 100755 --- a/hack/test-shellspec.sh +++ b/hack/test-shellspec.sh @@ -15,7 +15,7 @@ REF=temp-$(openssl rand -base64 12) git fetch origin "${GITHUB_BASE_REF:-main}:${REF}" >/dev/null 2>&1 function cleanup() { # shellcheck disable=SC2317 - git branch --delete "${REF}" >/dev/null 2>&1 || true + git branch -D "${REF}" >/dev/null 2>&1 || true } trap cleanup EXIT readarray CHANGED_FILES < <({ if [[ -n "${GITHUB_ACTIONS:-}" ]]; then git diff HEAD~1 --name-only; else git diff .."${REF}" --name-only; git status --porcelain=v1 | cut -c 4-; fi; }| uniq)