vole
Site
Clone
Read only, no credentials:
https://rodent.software/vole.git
Write over SSH with a registered key:
git clone ssh://git@rodent.software/vole.git
Self-hosted forge that lives in your Git repo.
Serve LFS objects in the raw and blob views
54bbbe45eadc398d4c1039a3b4b41d257e97083e · Keenan Nemetz · 13d ago · parent 3b2bcc30
Serve LFS objects in the raw and blob views The code browser read the committed blob, so an LFS-tracked texture was a 130-byte pointer: raw returned it with an image content type, and the blob page showed pointer source instead of the picture. Game teams browse assets in the forge, so this was the most visible part of the engine gap. openBlobSource reads at most one pointer's worth of the blob. A pointer is resolved through the repository's LFS namespace, which keeps private and cross-repository reads at the 404 they already were. Raw serves the object with ServeContent, so Range, HEAD, ETag and conditional requests work on the asset; blob reads the object into the existing preview logic, and the object size, not the pointer size, decides the preview cap. A pointer whose object is missing says so: raw answers 404, and the blob page shows the pointer with a note rather than pretending it is the file. Files larger than a pointer that merely begin with the version line pass through the normal path. Stacked on render-media-previews: the raw type and preview logic this builds on are not on main yet.
server/web/templates/code.html +3
| @@ -166,6 +166,9 @@ git push -u origin {{.Ref}}</pre> | |||
| 166 | 166 | ||
| 167 | 167 | {{define "code_blob"}} | |
| 168 | 168 | {{template "code_tabbar" .}} | |
| 169 | {{if .LFSMissing}}<div class="card"><p class="muted">This file names a Git LFS object that is not | ||
| 170 | stored on this instance, so the pointer file is shown instead. Ask a maintainer to restore the | ||
| 171 | object; a clone with <code>git lfs</code> will report the same missing object.</p></div>{{end}} | ||
| 169 | 172 | {{if .ModelPreview}} | |
| 170 | 173 | {{/* app.js imports the viewer only when it finds this element; the fallback is | |
| 171 | 174 | what a reader without JavaScript or WebGL sees. */}} | |