fix(git): pre-push rejects merging main into feature branches after #1282 Co-authored-by #1286

Closed
opened 2026-09-21 04:03:08 +00:00 by PlasticDigits · 2 comments

Summary

ad2d2493 on main (ADR 0006, from PR #1282) has a Co-authored-by: Cursor <cursoragent@cursor.com> trailer. Local .githooks/pre-push scans remote_oid..local_oid of the feature branch. Merging origin/main into a PR branch then pushing re-introduces that commit in the push range, so the hook rejects the push even though the commit is already on main.

This blocked client-side PR updates during the #1270/#1281/#1278 land. Workaround used: Forgejo POST /pulls/{n}/update (server-side merge of main into the head). Do not rewrite main. Do not --no-verify.

Remaining

  • Change pre-push (and any similar check) to ignore commits already reachable from origin/main.
  • Leave ad2d2493 on main (no history rewrite).

Acceptance criteria

  • git merge origin/main on a feature branch plus git push succeeds when the only policy-violating commit is already on origin/main.
  • New commits with email / Co-authored-by trailers still fail.
## Summary `ad2d2493` on `main` (ADR 0006, from PR #1282) has a `Co-authored-by: Cursor <cursoragent@cursor.com>` trailer. Local `.githooks/pre-push` scans `remote_oid..local_oid` of the **feature branch**. Merging `origin/main` into a PR branch then pushing re-introduces that commit in the push range, so the hook rejects the push even though the commit is already on `main`. This blocked client-side PR updates during the #1270/#1281/#1278 land. Workaround used: Forgejo `POST /pulls/{n}/update` (server-side merge of `main` into the head). Do not rewrite `main`. Do not `--no-verify`. ## Remaining - Change pre-push (and any similar check) to ignore commits already reachable from `origin/main`. - Leave `ad2d2493` on `main` (no history rewrite). ## Acceptance criteria - [ ] `git merge origin/main` on a feature branch plus `git push` succeeds when the only policy-violating commit is already on `origin/main`. - [ ] New commits with email / Co-authored-by trailers still fail.
Author
Owner

cl8y-agent-control: queued implement job a33608ca-c230-4530-b55e-4ec04d84eb7d (not executed; no Hetzner VM).

cl8y-agent-control: queued `implement` job `a33608ca-c230-4530-b55e-4ec04d84eb7d` (not executed; no Hetzner VM).
Author
Owner

Fixed via PR #1287 (pre-push skips commits already on origin/main). Stacked with later PRs' unpublished-commit range. Hook verify residue from that stack is PR #1301.

Leftover ops: #1300

Fixed via PR #1287 (pre-push skips commits already on origin/main). Stacked with later PRs' unpublished-commit range. Hook verify residue from that stack is PR #1301. Leftover ops: https://git.cl8y.com/code/cl8y-dex-terraclassic/issues/1300
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
code/cl8y-dex-terraclassic#1286
No description provided.