diff options
author | tjpcc <tjp@ctrl-c.club> | 2023-09-17 16:52:47 -0600 |
---|---|---|
committer | tjpcc <tjp@ctrl-c.club> | 2023-09-17 16:52:47 -0600 |
commit | fd79efff7504853ab4b7070ee186f4b7a346d21d (patch) | |
tree | c3890df1ed1d27395251f2f927e02c156a2f3db6 /templates | |
parent | a7ce20fee62a52794bf8bf940d0fd1f4134158b1 (diff) |
fix diffs and add diffstats in gopher
Diffstat (limited to 'templates')
-rw-r--r-- | templates/ref.gophermap | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/templates/ref.gophermap b/templates/ref.gophermap index 3e8d6f9..c7de102 100644 --- a/templates/ref.gophermap +++ b/templates/ref.gophermap @@ -15,7 +15,7 @@ i {{$.Selector}} {{$.Host}} {{$.Port}} {{ if ne .Parents nil -}} 0🔩 Full Diff {{join $.Selector "../../diff" .ParentHash .Hash}} {{$.Host}} {{$.Port}}
{{ else -}} -0🔩 Full Diff {{combine $.Selector "../diff/4b825dc642cb6eb9a060e54bf8d69288fbee4904" .Hash}} {{$.Host}} {{$.Port}}
+0🔩 Full Diff {{join $.Selector ".." ".." "diff" "4b825dc642cb6eb9a060e54bf8d69288fbee4904" .Hash}} {{$.Host}} {{$.Port}}
{{ end -}} {{ range .Parents -}} 1👤 Parent {{slice . 0 8}} {{combine $.Selector .}} {{$.Host}} {{$.Port}}
@@ -30,5 +30,13 @@ i {{$.Selector}} {{$.Host}} {{$.Port}} i {{$.Selector}} {{$.Host}} {{$.Port}}
iAuthored by {{.AuthorName}}<{{.AuthorEmail}}> on {{.AuthorDate.Format "Mon Jan _2 15:04:05 MST 2006"}} {{$.Selector}} {{$.Host}} {{$.Port}}
iCommitted by {{.CommitterName}}<{{.CommitterEmail}}> on {{.CommitDate.Format "Mon Jan _2 15:04:05 MST 2006"}} {{$.Selector}} {{$.Host}} {{$.Port}}
+i {{$.Selector}} {{$.Host}} {{$.Port}}
+{{ if eq .Parents nil -}} +{{.Repo.Diffstat $.Ctx "4b825dc642cb6eb9a060e54bf8d69288fbee4904" .Hash | rawtext $.Selector $.Host $.Port }}
+{{ else -}} +{{ with index .Parents 0 -}} +{{$.Repo.Diffstat $.Ctx . $.Params.ref | rawtext $.Selector $.Host $.Port }}
+{{ end -}} +{{ end -}} {{ end -}} .
|