feat: Display reference link in the log
Gabriel A. Giovanini mail@gabrielgio.me
Tue, 18 Feb 2025 18:26:27 +0100
1 files changed,
9 insertions(+),
1 deletions(-)
jump to
M
templates/log.html
→
templates/log.html
@@ -11,7 +11,15 @@ {{ $repo := .name }}
<div class="log"> {{ range .commits }} <div> - <div><a href="/{{ $repo }}/commit/{{ .Commit.Hash.String }}" class="commit-hash">{{ slice .Commit.Hash.String 0 8 }}</a></div> + <div> + <a href="/{{ $repo }}/commit/{{ .Commit.Hash.String }}" class="commit-hash">{{ slice .Commit.Hash.String 0 8 }}</a> + {{ if .HasReference }} + — + {{ range $ref := .References }} + <a href="/{{ $repo }}/tree/{{ $ref.Name.Short }}" class="commit-hash">{{ $ref.Name.Short }}</a> + {{ end }} + {{ end }} + </div> <pre>{{ .Commit.Message }}</pre> </div> <div class="commit-info">