{{ define "repo/fragments/diff" }} {{ $repo := index . 0 }} {{ $diff := index . 1 }} {{ $opts := index . 2 }} {{ $commit := $diff.Commit }} {{ $diff := $diff.Diff }} {{ $isSplit := $opts.Split }} {{ $this := $commit.This }} {{ $parent := $commit.Parent }} {{ $last := sub (len $diff) 1 }}
This file has been deleted.
{{ else if .IsCopy }}This file has been copied.
{{ else if .IsBinary }}This is a binary file and will not be displayed.
{{ else }} {{ if $isSplit }} {{- template "repo/fragments/splitDiff" .Split -}} {{ else }} {{- template "repo/fragments/unifiedDiff" . -}} {{ end }} {{- end -}}