{{template "repo/header" .}}
{{$class := ""}} {{if .Commit.Signature}} {{$class = (printf "%s%s" $class " isSigned")}} {{if .Verification.Verified}} {{if eq .Verification.TrustStatus "trusted"}} {{$class = (printf "%s%s" $class " isVerified")}} {{else if eq .Verification.TrustStatus "untrusted"}} {{$class = (printf "%s%s" $class " isVerifiedUntrusted")}} {{else}} {{$class = (printf "%s%s" $class " isVerifiedUnmatched")}} {{end}} {{else if .Verification.Warning}} {{$class = (printf "%s%s" $class " isWarning")}} {{end}} {{end}}

{{RenderCommitMessage $.Context .Commit.Message $.RepoLink $.Repository.ComposeMetas}}{{template "repo/commit_statuses" dict "Status" .CommitStatus "Statuses" .CommitStatuses "root" $}}

{{if not $.PageIsWiki}}
{{.locale.Tr "repo.diff.browse_source"}} {{if and ($.Permission.CanWrite $.UnitTypeCode) (not $.Repository.IsArchived) (not .IsDeleted)}}{{- /* */ -}} {{end}}
{{end}}
{{if IsMultilineCommitMessage .Commit.Message}}
{{RenderCommitBody $.Context .Commit.Message $.RepoLink $.Repository.ComposeMetas}}
{{end}} {{if .BranchName}} {{svg "octicon-git-branch" 16 "gt-mr-2"}}{{.BranchName}} {{end}} {{if .TagName}} {{svg "octicon-tag" 16 "gt-mr-2"}}{{.TagName}} {{end}}
{{if .Author}} {{avatar .Author 28 "gt-mr-3"}} {{if .Author.FullName}} {{.Author.FullName}} {{else}} {{.Commit.Author.Name}} {{end}} {{else}} {{avatarByEmail .Commit.Author.Email .Commit.Author.Email 28 "gt-mr-3"}} {{.Commit.Author.Name}} {{end}} {{TimeSince .Commit.Author.When $.locale}} {{if or (ne .Commit.Committer.Name .Commit.Author.Name) (ne .Commit.Committer.Email .Commit.Author.Email)}} {{.locale.Tr "repo.diff.committed_by"}} {{if ne .Verification.CommittingUser.ID 0}} {{avatar .Verification.CommittingUser 28 "gt-mx-3"}} {{.Commit.Committer.Name}} {{else}} {{avatarByEmail .Commit.Committer.Email .Commit.Committer.Name 28 "gt-mr-3"}} {{.Commit.Committer.Name}} {{end}} {{end}}
{{if .Parents}}
{{.locale.Tr "repo.diff.parent"}} {{range .Parents}} {{if $.PageIsWiki}} {{ShortSha .}} {{else}} {{ShortSha .}} {{end}} {{end}}
{{end}}
{{.locale.Tr "repo.diff.commit"}} {{ShortSha .CommitID}}
{{if .Commit.Signature}}
{{if .Verification.Verified}} {{if ne .Verification.SigningUser.ID 0}} {{svg "gitea-lock" 16 "gt-mr-3"}} {{if eq .Verification.TrustStatus "trusted"}} {{.locale.Tr "repo.commits.signed_by"}}: {{else if eq .Verification.TrustStatus "untrusted"}} {{.locale.Tr "repo.commits.signed_by_untrusted_user"}}: {{else}} {{.locale.Tr "repo.commits.signed_by_untrusted_user_unmatched"}}: {{end}} {{avatar .Verification.SigningUser 28 "gt-mr-3"}} {{.Verification.SigningUser.GetDisplayName}} {{else}} {{svg "gitea-lock-cog" 16 "gt-mr-3"}} {{.locale.Tr "repo.commits.signed_by"}}: {{avatarByEmail .Verification.SigningEmail "" 28}} {{.Verification.SigningUser.GetDisplayName}} {{end}} {{else}} {{svg "gitea-unlock" 16 "gt-mr-3"}} {{.locale.Tr .Verification.Reason}} {{end}}
{{if .Verification.Verified}} {{if ne .Verification.SigningUser.ID 0}} {{svg "octicon-shield-check" 16 "gt-mr-3"}} {{if .Verification.SigningSSHKey}} {{.locale.Tr "repo.commits.ssh_key_fingerprint"}}: {{.Verification.SigningSSHKey.Fingerprint}} {{else}} {{.locale.Tr "repo.commits.gpg_key_id"}}: {{.Verification.SigningKey.PaddedKeyID}} {{end}} {{else}} {{svg "octicon-shield-lock" 16 "gt-mr-3"}} {{if .Verification.SigningSSHKey}} {{.locale.Tr "repo.commits.ssh_key_fingerprint"}}: {{.Verification.SigningSSHKey.Fingerprint}} {{else}} {{.locale.Tr "repo.commits.gpg_key_id"}}: {{.Verification.SigningKey.PaddedKeyID}} {{end}} {{end}} {{else if .Verification.Warning}} {{svg "octicon-shield" 16 "gt-mr-3"}} {{if .Verification.SigningSSHKey}} {{.locale.Tr "repo.commits.ssh_key_fingerprint"}}: {{.Verification.SigningSSHKey.Fingerprint}} {{else}} {{.locale.Tr "repo.commits.gpg_key_id"}}: {{.Verification.SigningKey.PaddedKeyID}} {{end}} {{else}} {{if .Verification.SigningKey}} {{if ne .Verification.SigningKey.KeyID ""}} {{svg "octicon-shield" 16 "gt-mr-3"}} {{.locale.Tr "repo.commits.gpg_key_id"}}: {{.Verification.SigningKey.PaddedKeyID}} {{end}} {{end}} {{if .Verification.SigningSSHKey}} {{if ne .Verification.SigningSSHKey.Fingerprint ""}} {{svg "octicon-shield" 16 "gt-mr-3"}} {{.locale.Tr "repo.commits.ssh_key_fingerprint"}}: {{.Verification.SigningSSHKey.Fingerprint}} {{end}} {{end}} {{end}}
{{end}} {{if .Note}}
{{svg "octicon-note" 16 "gt-mr-3"}} {{.locale.Tr "repo.diff.git-notes"}}: {{if .NoteAuthor}} {{if .NoteAuthor.FullName}} {{.NoteAuthor.FullName}} {{else}} {{.NoteCommit.Author.Name}} {{end}} {{else}} {{.NoteCommit.Author.Name}} {{end}} {{TimeSince .NoteCommit.Author.When $.locale}}
{{RenderNote $.Context .Note $.RepoLink $.Repository.ComposeMetas}}
{{end}} {{template "repo/diff/box" .}}