"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: gotwebd permalinks
To:
nathanael@dalliard.ch
Cc:
gameoftrees@openbsd.org
Date:
Wed, 11 Mar 2026 13:37:55 +0100

Download raw body.

Thread
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.