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.
Open one file at a time on the commit page
628d45239eb09af4e46c9dc779d30144e96c7e6f · Keenan Nemetz · 11d ago · parent 816cc543
Open one file at a time on the commit page
A commit page rendered every patch it contained, so a broad commit turned one
page load into every blob it touched. It now opens the file tree beside the diff
of a single file, the same shape a change request's Files tab uses: the tree is
built from `git show --name-status`, only the selected path's patch is read, and
a tree click swaps the pane over HTMX. `/commit/{sha}/{path}` deep-links a file
and a 512 KiB cap still bounds one file's patch.
The file tree became one widget for three surfaces rather than two, so its
context gained a Commit field and its href/target/status rules moved onto the
view (Branch, Diff, Href).
The pane's header is now one row: the file's name on the left and its line
counts on the right, with the separate "1 file changed" summary line dropped
when a single file fills the pane. The total-line remains for the multi-file
diff a compare renders.
server/web/templates/diff.html +9−3
| @@ -1,12 +1,18 @@ | |||
| 1 | 1 | {{/* The diff component, used by the commit view, the compare view and the change | |
| 2 | 2 | request Files tab. Go computes the parse and the summary (diff.go); this is | |
| 3 | only the table, including the inline review-comment row and its notes. */}} | ||
| 3 | only the table, including the inline review-comment row and its notes. Each | ||
| 4 | file's header carries the file's own counts, so a pane that shows one file | ||
| 5 | needs no separate summary line above it; the total line is for the multi-file | ||
| 6 | diff a compare renders. */}} | ||
| 4 | 7 | {{define "diff"}} | |
| 5 | <div class="diffsum muted">{{len .Files}} file(s) changed{{if .Added}} · <span class="adds">+{{.Added}}</span>{{end}}{{if .Removed}} · <span class="dels">−{{.Removed}}</span>{{end}}{{if .Truncated}} · showing the first 512 KiB{{end}}</div> | ||
| 8 | {{if ne (len .Files) 1}}<div class="diffsum muted">{{len .Files}} file{{if ne (len .Files) 1}}s{{end}} changed{{if .Added}} · <span class="adds">+{{.Added}}</span>{{end}}{{if .Removed}} · <span class="dels">−{{.Removed}}</span>{{end}}{{if .Truncated}} · showing the first 512 KiB{{end}}</div>{{end}} | ||
| 6 | 9 | {{range .Files}} | |
| 7 | 10 | {{$file := .}} | |
| 8 | 11 | <section class="diff"{{if .Language}} data-highlight="{{.Language}}"{{end}}> | |
| 9 | <h3><span class="path">{{if and .OldPath (ne .OldPath .NewPath)}}{{.OldPath}} → {{end}}{{.Label}}</span>{{if .Binary}} <span class="label">binary</span>{{end}}</h3> | ||
| 12 | <h3> | ||
| 13 | <span class="path">{{if and .OldPath (ne .OldPath .NewPath)}}{{.OldPath}} → {{end}}{{.Label}}</span>{{if .Binary}}<span class="label">binary</span>{{end}} | ||
| 14 | <span class="diffstat">{{if and $.Truncated (eq (len $.Files) 1)}}<span class="muted">showing the first 512 KiB</span>{{end}}{{if .Added}}<span class="adds">+{{.Added}}</span>{{end}}{{if .Removed}}<span class="dels">−{{.Removed}}</span>{{end}}</span> | ||
| 15 | </h3> | ||
| 10 | 16 | {{if .Binary}} | |
| 11 | 17 | <p class="binary">Binary file: no line diff to show. Use <code>git show</code> to inspect it.</p> | |
| 12 | 18 | {{end}} | |