{{ define "title" }} commit {{ .Diff.Commit.This }} {{ end }} {{ define "content" }} {{ $repo := .RepoInfo.FullName }} {{ $commit := .Diff.Commit }} {{ $stat := .Diff.Stat }} {{ $diff := .Diff.Diff }}
{{- $commit.Message -}}
{{ $commit.Author.Name }} {{ $commit.Author.Email}}
{{ $commit.Author.When.Format "Mon, 02 Jan 2006 15:04:05 -0700" }}
commit

{{ slice $commit.This 0 8 }}

{{ if $commit.Parent }}
parent

{{ slice $commit.Parent 0 8 }}

{{ end }}
{{ $stat.FilesChanged }} files changed, {{ $stat.Insertions }} insertions(+), {{ $stat.Deletions }} deletions(-)

jump to {{ range $diff }} {{ end }}
{{ $this := $commit.This }} {{ $parent := $commit.Parent }} {{ range $diff }}
{{ if .IsNew }} A {{ end }} {{ if .IsDelete }} D {{ end }} {{ if not (or .IsNew .IsDelete) }} M {{ end }} {{ if .Name.Old }} {{ .Name.Old }} {{ if .Name.New }} → {{ .Name.New }} {{ end }} {{ else }} {{ .Name.New }} {{- end -}} {{ if .IsBinary }}

Not showing binary file.

{{ else }}
      {{- range .TextFragments -}}
      

{{- .Header -}}

{{- range .Lines -}} {{- if eq .Op.String "+" -}} {{ .String }} {{- end -}} {{- if eq .Op.String "-" -}} {{ .String }} {{- end -}} {{- if eq .Op.String " " -}} {{ .String }} {{- end -}} {{- end -}} {{- end -}} {{- end -}}
{{ end }}
{{end}}