Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software:2222/vole.git

A free and open-source forge that lives in your Git repo.

#44

Make change requests follow branches and allow base retargeting

merged · by keenan 13d ago · merged into main at 41d1fee9 by keenan 13d ago

keenan opened this 13d ago

Why

Opening a request from a branch still pinned the review to the commit that existed at that moment. Every fixup needed change update --head, which is exactly the commit-shaped ergonomics this change removes. Stacked requests also had no way to move an upper request onto the base the lower one landed on.

What

  • A request opened from a branch records head_ref and follows it. post-receive moves the request’s head to the new tip after every accepted push.
  • Approvals and CI stay bound to an exact base + commit. A push moves the head, so old approvals stop counting and the new tip needs its own checks.
  • Approval writers require the base and head the approver saw. A push or retarget between rendering and submitting is refused, not silently approved.
  • Merged requests freeze the reviewed head.
  • Add --base and a Change base control for stacked requests. A new base changes the diff and invalidates approvals that named the old base.
  • Base branch names may contain slashes, which stacked feature branches need.
  • A request opened from a bare commit stays pinned until explicitly repointed.

Notes

The old “Follow branch” control was misleading, so it is now Repoint request and only changes which branch the request follows; normal pushes need no control.

Also fixes a pre-existing flake in the landing test where Prepare and Land straddle a second boundary and therefore write different merge commit IDs for the same merge.

Verification

vole workflow run verify passes: format, vet, build, govulncheck, packaging, markdown links, and go test -race ./....

Discussion (1)

keenan 13d ago

Updated the branch with a compact target control: base and head are one row, both selects preselect the current targets, and the help text is a single line. The separate Repoint request and Change base controls are gone; both targets post to one handler and are written in one metadata commit.