{{if .DiffNotAvailable}}

{{.i18n.Tr "repo.diff.data_not_available"}}

{{else}}
{{.i18n.Tr "repo.diff.stats_desc" .Diff.NumFiles .Diff.TotalAdditions .Diff.TotalDeletions | Str2HTML}}
    {{range .Diff.Files}}
  1. {{if not .IsBinary}} {{.NumAdditions}} {{.NumDeletions}} {{else}} {{$.i18n.Tr "repo.diff.bin"}} {{end}}
      {{.Name}}
  2. {{end}}
{{range $i, $file := .Diff.Files}} {{if $file.IsIncomplete}}

{{$.i18n.Tr "repo.diff.file_suppressed"}}
{{if not $file.IsRenamed}} + {{.NumAdditions}} - {{.NumDeletions}} {{end}}
{{$file.Name}}

{{else}}

{{if $file.IsBinary}} {{$.i18n.Tr "repo.diff.bin"}} {{else if not $file.IsRenamed}} + {{.NumAdditions}} - {{.NumDeletions}} {{end}}
{{if $file.IsRenamed}}{{$file.OldName}} → {{end}}{{$file.Name}} {{if not $file.IsSubmodule}}
{{if $file.IsDeleted}} {{$.i18n.Tr "repo.diff.view_file"}} {{else if $.SourcePath}} {{/* No SourcePath we assume the source repository no longer exists */}} {{$.i18n.Tr "repo.diff.view_file"}} {{end}}
{{end}}

{{if not $file.IsRenamed}} {{$isImage := (call $.IsImageFile $file.Name)}} {{if $isImage}}
{{else}}
{{if $.IsSplitStyle}} {{$highlightClass := $file.HighlightClass}} {{range $j, $section := $file.Sections}} {{range $k, $line := $section.Lines}} {{if eq .Type 4}} {{else}} {{end}} {{end}} {{end}} {{else}} {{template "repo/diff/section_unified" .}} {{end}}
{{$section.ComputedInlineDiffFor $line}}
{{if $line.LeftLine}}{{$section.ComputedInlineDiffFor $line}}{{end}}
{{if $line.RightLine}}{{$section.ComputedInlineDiffFor $line}}{{end}}
{{end}} {{end}}
{{end}}
{{end}} {{if .Diff.IsIncomplete}}

{{$.i18n.Tr "repo.diff.too_many_files"}}

{{end}} {{if .IsSplitStyle}} {{end}} {{end}}