all repos — elgit @ 263a1509dbd79b1df3abe1bd42e2cd5d45448dea

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

diff: show diff type

commit

263a1509dbd79b1df3abe1bd42e2cd5d45448dea

parent

194ec63d81ed7c8d6f63945139ea6d0bdfc597b3

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

changed files
M templates/commit.htmltemplates/commit.html
@@ -46,8 +46,17 @@ <section>
{{ $repo := .name }} {{ $this := .commit.This }} {{ range .diff }} - <div class="diff"> <div id="{{ .Name.New }}"> + <div class="diff"> + {{ if .IsNew }} + <span class="diff-type">A</span> + {{ end }} + {{ if .IsDelete }} + <span class="diff-type">D</span> + {{ end }} + {{ 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> {{ if .Name.New }}