{{ define "commit.html" }}{{ template "base" . }}{{ end }} {{ define "styles" }} {{ end }} {{ define "main" }} {{ $slug := print "/" .Info.Slug }} {{ $c := mod "commit" }} {{ $d := mod "diff" }}

{{ $c.Subject }}

{{ trunc 12 $c.SHA }} · {{ $c.Author }} ·

{{ with $c.Body }}
{{ . }}
{{ end }}
{{ with $c.Parents }} {{ $multi := gt (len $c.Parents) 1 }} {{ range . }} parent {{ trunc 12 . }} {{/* For a merge commit, each parent gives a genuinely different diff. For an ordinary single-parent commit it's the same diff already rendered below, so skip the redundant chip there. */}} {{ if $multi }}diff vs {{ trunc 8 . }}{{ end }} {{ end }} {{ end }} view tree

Changed files

{{ template "diffstat" (dict "Base" $slug "Ref" $c.SHA "Diff" $d) }}
{{ with $d.Patch }}
{{ patch . }}
{{ end }} {{ end }}