{{template "repo/header" .}}

{{ctx.RenderUtils.RenderCommitMessage .Commit.MessageUTF8 $.Repository}} {{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 .Commit.MessageBody}}
{{ctx.RenderUtils.RenderCommitBody .Commit.MessageUTF8 $.Repository}}
{{end}} {{template "repo/commit_load_branches_and_tags" .}}
{{$authors := ctx.RenderUtils.AvatarStackWithNames .CommitAvatarStackData}} {{$committedAt := DateUtils.TimeSince .Commit.Committer.When}} {{if .Commit.CommitterIsAuthor}} {{ctx.Locale.Tr "repo.diff.committed_at" $authors $committedAt}} {{else}} {{$committerAvatar := ""}}{{$committerDisplayName := ""}} {{if .Verification.CommittingUser}} {{$committerAvatar = ctx.AvatarUtils.Avatar .Verification.CommittingUser 20}} {{$committerDisplayName = .Verification.CommittingUser.GetShortDisplayNameLinkHTML}} {{else}} {{$committerAvatar = ctx.AvatarUtils.AvatarByEmail .Commit.Committer.Email .Commit.Committer.Email 20}} {{$committerDisplayName = .Commit.Committer.Name}} {{end}} {{$committer := HTMLFormat `%s %s` $committerAvatar $committerDisplayName}} {{ctx.Locale.Tr "repo.diff.authored_committed_at" $authors $committer $committedAt}} {{end}} {{if .Verification}} {{template "repo/commit_sign_badge" dict "CommitSignVerification" .Verification}} {{end}}
{{if .Parents}}
{{len .Parents}} {{ctx.Locale.TrN (len .Parents) "repo.diff.parent" "repo.diff.parents"}} {{range $parentCommitID := .Parents}} {{ShortSha $parentCommitID}} {{end}}
{{end}}
{{ctx.Locale.Tr "repo.diff.commit"}} {{ShortSha .CommitID}}
{{if .ShowDiffSummaryInCommitHeader}}
{{ctx.Locale.TrN .DiffShortStat.NumFiles "repo.diff.num_files_changed_1" "repo.diff.num_files_changed_n" .DiffShortStat.NumFiles}} {{template "repo/diff/stats" dict "Addition" .DiffShortStat.TotalAddition "Deletion" .DiffShortStat.TotalDeletion}}
{{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}} {{DateUtils.TimeSince .NoteCommit.Author.When}}
{{.NoteRendered}}
{{end}} {{template "repo/diff/box" .}}