Link to parent commit file version in commit view It makes sense for [oldfile] in [oldfile]->[newfile] to link to the previous version. This is also how cgit behaves.
1 file changed, 2 insertions(+), 1 deletion(-)
jump to
M templates/commit.html → templates/commit.html
@@ -45,6 +45,7 @@ </section> <section> {{ $repo := .name }} {{ $this := .commit.This }} + {{ $parent := .commit.Parent }} {{ range .diff }} <div id="{{ .Name.New }}"> <div class="diff">@@ -58,7 +59,7 @@ {{ if not (or .IsNew .IsDelete) }} <span class="diff-type">M</span> {{ end }} {{ if .Name.Old }} - <a href="/{{ $repo }}/blob/{{ $this }}/{{ .Name.Old }}">{{ .Name.Old }}</a> + <a href="/{{ $repo }}/blob/{{ $parent }}/{{ .Name.Old }}">{{ .Name.Old }}</a> {{ if .Name.New }} → <a href="/{{ $repo }}/blob/{{ $this }}/{{ .Name.New }}">{{ .Name.New }}</a>