all repos — elgit @ d1775c7e074136da97880862f9d9b48a5196530f

fork of legit: web frontend for git, written in go

feat: Display reference link in the log

commit

d1775c7e074136da97880862f9d9b48a5196530f

parent

6777731007fc7f9ce1d05f71393bd958767a33fb

1 file changed, 9 insertions(+), 1 deletion(-)

changed files
M templates/log.htmltemplates/log.html
@@ -10,7 +10,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">