web frontend for git (tangled's grandpa)
7
fork

Configure Feed

Select the types of activity you want to include in your feed.

diff: show diff type

+18 -1
+4
git/diff.go
··· 21 21 } 22 22 TextFragments []TextFragment 23 23 IsBinary bool 24 + IsNew bool 25 + IsDelete bool 24 26 } 25 27 26 28 // A nicer git diff representation. ··· 90 92 ndiff.Name.New = d.NewName 91 93 ndiff.Name.Old = d.OldName 92 94 ndiff.IsBinary = d.IsBinary 95 + ndiff.IsNew = d.IsNew 96 + ndiff.IsDelete = d.IsDelete 93 97 94 98 for _, tf := range d.TextFragments { 95 99 ndiff.TextFragments = append(ndiff.TextFragments, TextFragment{
+4
static/style.css
··· 238 238 overflow: scroll; 239 239 } 240 240 241 + .diff-type { 242 + color: var(--gray); 243 + } 244 + 241 245 .commit-info { 242 246 color: var(--gray); 243 247 padding-bottom: 1.5rem;
+10 -1
templates/commit.html
··· 46 46 {{ $repo := .name }} 47 47 {{ $this := .commit.This }} 48 48 {{ range .diff }} 49 - <div class="diff"> 50 49 <div id="{{ .Name.New }}"> 50 + <div class="diff"> 51 + {{ if .IsNew }} 52 + <span class="diff-type">A</span> 53 + {{ end }} 54 + {{ if .IsDelete }} 55 + <span class="diff-type">D</span> 56 + {{ end }} 57 + {{ if not (or .IsNew .IsDelete) }} 58 + <span class="diff-type">M</span> 59 + {{ end }} 51 60 {{ if .Name.Old }} 52 61 <a href="/{{ $repo }}/blob/{{ $this }}/{{ .Name.Old }}">{{ .Name.Old }}</a> 53 62 {{ if .Name.New }}