{{/* {{ template "tree-table" (dict "Base" "/slug" "Ref" ref "Entries" entries) }} */}}
{{ define "tree-table" }}
| Name | Type | Size |
{{ $ := . }}{{ range .Entries }}
|
{{ if .IsDir }}{{ .Name }}
{{ else }}{{ .Name }}{{ end }}
|
{{ if .IsDir }}dir{{ else if .IsSubmodule }}submodule{{ else }}file{{ end }} |
{{ if .IsDir }}—{{ else }}{{ bytes .Size }}{{ end }} |
{{ else }}
| This directory is empty. |
{{ end }}
{{ end }}
{{/* {{ template "commit-table" (dict "Base" "/slug" "Commits" commits) }} */}}
{{ define "commit-table" }}
{{ end }}
{{/* {{ template "diffstat" (dict "Base" "/slug" "Ref" sha "Diff" d) }} */}}
{{ define "diffstat" }}
{{ $ := . }}
{{ with .Diff.Stats }}
| File | Changes | |
{{ range . }}
| {{ .Path }} |
{{ if eq .Status "B" }}binary
{{ else }}+{{ .Added }} −{{ .Deleted }}{{ end }}
|
raw |
{{ end }}
{{ else }}
No files changed.
{{ end }}
{{ if .Diff.Truncated }}This diff exceeds the size limit and is shown in part. Fetch the file with raw to see all of it.
{{ end }}
{{ end }}