{{- range .Ordinary -}}
{{ if and (eq .X 'A') (eq .Y '.') -}}Add {{ .Path }}
{{ else if and (eq .X 'D') (eq .Y '.') -}}Remove {{ .Path }}
{{ else if and (eq .X 'M') (eq .Y '.') -}}Update {{ .Path }}
{{ else }}{{with (printf "unsupported XY: %q" (printf "%c%c" .X .Y)) }}{{ fail . }}{{ end }}
{{ end }}
{{- end -}}

{{- range .RenamedOrCopied -}}
{{ if and (eq .X 'R') (eq .Y '.') }}Rename {{ .OrigPath }} to {{ .Path }}
{{ else }}{{with (printf "unsupported XY: %q" (printf "%c%c" .X .Y)) }}{{ fail . }}{{ end }}
{{ end }}
{{- end -}}

{{- range .Unmerged -}}
{{ fail "unmerged files" }}
{{- end -}}

{{- range .Untracked -}}
{{ fail "untracked files" }}
{{- end -}}
