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/diff.go +13
| @@ -33,6 +33,19 @@ func (f diffFile) Label() string { | |||
| 33 | 33 | return f.OldPath | |
| 34 | 34 | } | |
| 35 | 35 | ||
| 36 | // pathspec is what git has to be told to print this file's patch. A rename needs | ||
| 37 | // both of its paths: filtered to the destination alone, git reports what is left | ||
| 38 | // as a new file and the rename is lost. | ||
| 39 | func (f diffFile) pathspec() []string { | ||
| 40 | if f.OldPath != "" && f.OldPath != f.NewPath { | ||
| 41 | return []string{f.OldPath, f.NewPath} | ||
| 42 | } | ||
| 43 | if f.NewPath != "" { | ||
| 44 | return []string{f.NewPath} | ||
| 45 | } | ||
| 46 | return []string{f.OldPath} | ||
| 47 | } | ||
| 48 | |||
| 36 | 49 | type diffHunk struct { | |
| 37 | 50 | Header string | |
| 38 | 51 | Lines []diffLine | |