Skip to content

Commit 1ffe1ec

Browse files
Fix shellcheck issue in main history guard
1 parent 2ac35f3 commit 1ffe1ec

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

scripts/main_branch_history_guard.sh

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,9 @@ fi
5555

5656
ensure_allowed_merge_refs() {
5757
local missing=()
58-
local branch=""
59-
for branch in dev; do
60-
if git rev-parse --verify "refs/remotes/origin/${branch}^{commit}" >/dev/null 2>&1; then
61-
continue
62-
fi
63-
missing+=("${branch}")
64-
done
58+
if ! git rev-parse --verify "refs/remotes/origin/dev^{commit}" >/dev/null 2>&1; then
59+
missing+=("dev")
60+
fi
6561

6662
if [[ "${#missing[@]}" -eq 0 ]]; then
6763
return

0 commit comments

Comments
 (0)