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

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

{{if not $.PageIsWiki}}
{{ctx.Locale.Tr "repo.diff.browse_source"}} {{if and ($.Permission.CanWrite ctx.Consts.RepoUnitTypeCode) (not $.Repository.IsArchived) (not .IsDeleted)}}{{- /* */ -}} {{end}}
{{end}}
{{if IsMultilineCommitMessage .Commit.Message}}
{{RenderCommitBody $.Context .Commit.Message ($.Repository.ComposeMetas ctx)}}
{{end}} {{template "repo/commit_load_branches_and_tags" .}}
{{if .Author}} {{ctx.AvatarUtils.Avatar .Author 28 "tw-mr-2"}} {{if .Author.FullName}} {{.Author.FullName}} {{else}} {{.Commit.Author.Name}} {{end}} {{else}} {{ctx.AvatarUtils.AvatarByEmail .Commit.Author.Email .Commit.Author.Email 28 "tw-mr-2"}} {{.Commit.Author.Name}} {{end}} {{TimeSince .Commit.Author.When ctx.Locale}} {{if or (ne .Commit.Committer.Name .Commit.Author.Name) (ne .Commit.Committer.Email .Commit.Author.Email)}} {{ctx.Locale.Tr "repo.diff.committed_by"}} {{if ne .Verification.CommittingUser.ID 0}} {{ctx.AvatarUtils.Avatar .Verification.CommittingUser 28 "tw-mx-2"}} {{.Commit.Committer.Name}} {{else}} {{ctx.AvatarUtils.AvatarByEmail .Commit.Committer.Email .Commit.Committer.Name 28 "tw-mr-2"}} {{.Commit.Committer.Name}} {{end}} {{end}}
{{if .Parents}}
{{ctx.Locale.Tr "repo.diff.parent"}} {{range .Parents}} {{if $.PageIsWiki}} {{ShortSha .}} {{else}} {{ShortSha .}} {{end}} {{end}}
{{end}}
{{ctx.Locale.Tr "repo.diff.commit"}} {{ShortSha .CommitID}}
{{if .Commit.Signature}}
{{if .Verification.Verified}} {{if ne .Verification.SigningUser.ID 0}} {{svg "gitea-lock" 16 "tw-mr-2"}} {{if eq .Verification.TrustStatus "trusted"}} {{ctx.Locale.Tr "repo.commits.signed_by"}}: {{else if eq .Verification.TrustStatus "untrusted"}} {{ctx.Locale.Tr "repo.commits.signed_by_untrusted_user"}}: {{else}} {{ctx.Locale.Tr "repo.commits.signed_by_untrusted_user_unmatched"}}: {{end}} {{ctx.AvatarUtils.Avatar .Verification.SigningUser 28 "tw-mr-2"}} {{.Verification.SigningUser.GetDisplayName}} {{else}} {{svg "gitea-lock-cog" 16 "tw-mr-2"}} {{ctx.Locale.Tr "repo.commits.signed_by"}}: {{ctx.AvatarUtils.AvatarByEmail .Verification.SigningEmail "" 28 "tw-mr-2"}} {{.Verification.SigningUser.GetDisplayName}} {{end}} {{else}} {{svg "gitea-unlock" 16 "tw-mr-2"}} {{ctx.Locale.Tr .Verification.Reason}} {{end}}
{{if .Verification.Verified}} {{if ne .Verification.SigningUser.ID 0}} {{svg "octicon-verified" 16 "tw-mr-2"}} {{if .Verification.SigningSSHKey}} {{ctx.Locale.Tr "repo.commits.ssh_key_fingerprint"}}: {{.Verification.SigningSSHKey.Fingerprint}} {{else}} {{ctx.Locale.Tr "repo.commits.gpg_key_id"}}: {{.Verification.SigningKey.PaddedKeyID}} {{end}} {{else}} {{svg "octicon-unverified" 16 "tw-mr-2"}} {{if .Verification.SigningSSHKey}} {{ctx.Locale.Tr "repo.commits.ssh_key_fingerprint"}}: {{.Verification.SigningSSHKey.Fingerprint}} {{else}} {{ctx.Locale.Tr "repo.commits.gpg_key_id"}}: {{.Verification.SigningKey.PaddedKeyID}} {{end}} {{end}} {{else if .Verification.Warning}} {{svg "octicon-unverified" 16 "tw-mr-2"}} {{if .Verification.SigningSSHKey}} {{ctx.Locale.Tr "repo.commits.ssh_key_fingerprint"}}: {{.Verification.SigningSSHKey.Fingerprint}} {{else}} {{ctx.Locale.Tr "repo.commits.gpg_key_id"}}: {{.Verification.SigningKey.PaddedKeyID}} {{end}} {{else}} {{if .Verification.SigningKey}} {{if ne .Verification.SigningKey.KeyID ""}} {{svg "octicon-verified" 16 "tw-mr-2"}} {{ctx.Locale.Tr "repo.commits.gpg_key_id"}}: {{.Verification.SigningKey.PaddedKeyID}} {{end}} {{end}} {{if .Verification.SigningSSHKey}} {{if ne .Verification.SigningSSHKey.Fingerprint ""}} {{svg "octicon-verified" 16 "tw-mr-2"}} {{ctx.Locale.Tr "repo.commits.ssh_key_fingerprint"}}: {{.Verification.SigningSSHKey.Fingerprint}} {{end}} {{end}} {{end}}
{{end}} {{if .NoteRendered}}
{{svg "octicon-note" 16 "tw-mr-2"}} {{ctx.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 ctx.Locale}}
{{.NoteRendered | SanitizeHTML}}
{{end}} {{template "repo/diff/box" .}}