Skip to content

Commit

Permalink
Unconditionally remove the temp branch
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
zregvart committed May 29, 2024
1 parent 3f1f0d4 commit ee3f244
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hack/test-shellspec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ee3f244

Please sign in to comment.