Download raw body.
gotwebd permalinks
Stefan Sperling <stsp@stsp.name> wrote: > On Wed, Mar 11, 2026 at 01:00:53PM +0100, nathanael@dalliard.ch wrote: > > hi > > > > is there a way to get a permalink to a specific file in a repo? > > > > i've noticed that links in the web interface all include the commit > > hash, which makes me think this might not be currently possible or is > > there a workaround i'm missing? > > The current implementation requires a commit hash. In theory we could > allow references to be passed instead, as is allowed on the command line. > > We have a TODO item about redesigning gotweb URL routing, with the goal > of simplifying the URL scheme and avoid use of query parameters. > I assume we could take another look at allowing refs as part of that redesign. > > However, without a commit hash a link to a file cannot really be permanent. > > What should happen if the file gets deleted at some point in time? > > What should happen if the deleted file is reinstated with different content > at a later point in time? > > What should happen if the file gets replaced several times over in the > life time of the repository? By a file or a directory? > > Perhaps you don't care about these cases because you'll never delete the > files you want to link to. But that is a specific use case, not the general > case which the overall design needs to cope with. thanks for the answer. i agree that i don't have the whole picture and my usecase might be niche. just to be clear what i am talking about: https://codeberg.org/OpenBSD/src/src/branch/master/bin/cat/cat.c https://openbsd.gothub.org/repos/?action=blob&commit=a944417af3ca44cd189efef88c2299690e2958fd&file=cat.c&folder=%2Fbin%2Fcat&path=src.git the codeberg link always points to the newest cat.c in the master branch and the gothub link doesn't (at least if i understand it correctly) i guess i am used to this from git web interfaces like cgit, stagit and others. but of course i understand, if that is not wanted for gotwebd
gotwebd permalinks