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/git/vole.git

Write over SSH with a registered key:

git clone ssh://git@0.0.0.0:2222/vole.git

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

Show what a merged change request landed

2841d922c15ce32fb600d992f9f5dc2d22c48f90 · Keenan Nemetz · 13d ago · parent c765ae2e

Show what a merged change request landed

Landing moves the base to include the head, so the three-dot diff the
Files tab reviews an open request with becomes empty by definition: the
merge base of the base and the head is the head itself. A merged request
therefore looked like it had never changed anything.

The landing mark now records `merged_base`, the tip the base pointed at
before it moved, and the Files tab diffs that against what landed: the
head for a fast-forward, the merge commit otherwise, so conflict
resolution is part of the review too. The record is written in the same
commit as the mark, and a retry that finds the head already landed keeps
the base it has instead of naming the moved tip.

`merged_base` is optional on read because landings made before the field
existed have none. Such a record falls back to the merge commit's first
parent when the landing was a merge, and claims nothing when it was a
fast-forward and the starting point is gone.

The request page shows the file count and the review link for a merged
request as well, with the merge named beside it, instead of replacing
them with "Already merged".

server/web/templates/requests.html +3−3

@@ -89,10 +89,10 @@
89 89 {{range $i, $id := .Request.Closes}}{{if $i}}, {{end}}<a href="/r/{{$.Name}}/issues/{{$id}}">#{{short $id}}</a>{{end}}
90 90 when merged.</p>
91 91 {{end}}
92 {{if .AlreadyMerged}}
92 {{if .FileCount}}
93 <p class="muted">{{.FileCount}} file(s) changed{{if .Added}} · <span class="adds">+{{.Added}}</span>{{end}}{{if .Removed}} · <span class="dels">−{{.Removed}}</span>{{end}} · <a href="/r/{{.Name}}/requests/{{.Request.ID}}/files">Review files</a>{{if .AlreadyMerged}} · merged into {{.Request.Base}}{{end}}</p>
94 {{else if .AlreadyMerged}}
93 95 <p class="muted">Already merged into {{.Request.Base}}.</p>
94 {{else if .FileCount}}
95 <p class="muted">{{.FileCount}} file(s) changed{{if .Added}} · <span class="adds">+{{.Added}}</span>{{end}}{{if .Removed}} · <span class="dels">−{{.Removed}}</span>{{end}} · <a href="/r/{{.Name}}/requests/{{.Request.ID}}/files">Review files</a></p>
96 96 {{else}}
97 97 <p class="muted">No changes, or the head is not reachable from this repository yet.</p>
98 98 {{end}}