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.

#32

Show the head branch on a change request

closed · opened by keenan 14d ago

keenan opened this 14d ago

A change request records base: as a branch name and head: as a full commit id. The head branch is never recorded: the web form resolves the chosen branch to a commit and discards the ref, vole change new --head <rev> does the same, and metadata.Request has no field for it. The request page therefore shows main ← 43f98bcd, and nothing says which branch was proposed.

Why

The commit must stay authoritative: approvals, CI results, the diff and the merge all name the commit, and a branch that moves afterwards must not carry an approval with it. But the branch name is how people talk about the change (“alice’s retry-timeout branch”), how they fetch and check out the work, and how they find it after the request is merged. Showing only a commit id means opening the commit page to see what branch it came from — and after the branch is deleted, that answer is gone too.

Found while working on change request 01M5XM4H99DZ71VTJC8YWYS1CC: the page shows only main ← 43f98bcd, even though the request was opened from a branch.

Scope

  • Record the head branch as advisory metadata, e.g. head_ref:, on request.md. Written when a request is opened from the web form or from vole change new --head <branch>. Optional on read, because existing records have none.
  • Validated like base (a branch name, branchNameRE). Stored only: landing, approvals, the CI lookup and the diff keep using head:. A test should pin that a branch name is never consulted for authorization.
  • Show it in the request list’s Base ← Head column, the request sidebar’s Head row, and vole change show, beside the reviewed commit — e.g. main ← alice/fix-timeout (43f98bcd).
  • Tolerate staleness: the branch may have moved or been deleted. The page shows the recorded name as a name, not as a claim that the branch still points at the reviewed commit, and must not break when the ref is gone.

Acceptance criteria

  • A request opened from the browser records the branch the form offered.
  • vole change new --head <branch> records the branch when the revision names one; a raw commit id records none.
  • Existing requests without the field render exactly as they do today.
  • The request page, the request list and vole change show show the branch when it is recorded.
  • The land gate, approvals, CI lookup and diff still use head: only; a moved branch cannot authorise a different commit.
  • A deleted or moved branch leaves the page working, without implying that the reviewed commit changed.

Comments (0)

No comments yet.