fix: remove --force-with-lease from main push to unblock 16 PRs
Some checks are pending
CI / lint-and-test (push) Waiting to run
Some checks are pending
CI / lint-and-test (push) Waiting to run
Forgejo categorically blocks --force-with-lease on protected branches, even for fast-forward pushes. The cherry-picked branch is already a descendant of origin/main, so a regular push is a fast-forward by definition. Non-ff is rejected by default — same safety guarantee. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
25062cf130
commit
ff357c4bbc
1 changed files with 4 additions and 5 deletions
|
|
@ -1456,9 +1456,9 @@ async def _merge_domain_queue(conn, domain: str) -> tuple[int, int]:
|
|||
failed += 1
|
||||
continue
|
||||
|
||||
# Local ff-merge: push cherry-picked branch as main (Rhea's approach, Leo+Rhea: local primary)
|
||||
# The branch was just cherry-picked onto origin/main,
|
||||
# so origin/{branch} is a descendant of origin/main. Push it as main.
|
||||
# Local ff-push: cherry-picked branch is a descendant of origin/main.
|
||||
# Regular push = fast-forward. Non-ff rejected by default (same safety).
|
||||
# --force-with-lease removed: Forgejo categorically blocks it on protected branches.
|
||||
await _git("fetch", "origin", branch, timeout=15)
|
||||
rc, main_sha = await _git("rev-parse", "origin/main")
|
||||
main_sha = main_sha.strip() if rc == 0 else ""
|
||||
|
|
@ -1469,8 +1469,7 @@ async def _merge_domain_queue(conn, domain: str) -> tuple[int, int]:
|
|||
merge_msg = ""
|
||||
if branch_sha:
|
||||
rc, out = await _git(
|
||||
"push", f"--force-with-lease=main:{main_sha}",
|
||||
"origin", f"{branch_sha}:main",
|
||||
"push", "origin", f"{branch_sha}:main",
|
||||
timeout=30,
|
||||
)
|
||||
if rc == 0:
|
||||
|
|
|
|||
Loading…
Reference in a new issue