From 2f56ab7999b6cf7ee5f221a8cc55c66a6d6f5bb8 Mon Sep 17 00:00:00 2001 From: Giteabot <teabot@gitea.io> Date: Mon, 6 Nov 2023 09:09:35 +0800 Subject: [PATCH] Show correct commit sha when viewing single commit diff (#27916) (#27921) Backport #27916 by @sebastian-sauer Show the correct sha when viewing a single commit.  Co-authored-by: sebastian-sauer <sauer.sebastian@gmail.com> --- templates/repo/diff/box.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl index 9be801b7d3..f233a71e19 100644 --- a/templates/repo/diff/box.tmpl +++ b/templates/repo/diff/box.tmpl @@ -50,7 +50,7 @@ {{if not .DiffNotAvailable}} {{if and .IsShowingOnlySingleCommit .PageIsPullFiles}} <div class="ui info message"> - <div>{{ctx.Locale.Tr "repo.pulls.showing_only_single_commit" (ShortSha .BeforeCommitID)}} - <a href="{{$.Issue.Link}}/files?style={{if $.IsSplitStyle}}split{{else}}unified{{end}}&whitespace={{$.WhitespaceBehavior}}&show-outdated={{$.ShowOutdatedComments}}">{{ctx.Locale.Tr "repo.pulls.show_all_commits"}}</a></div> + <div>{{ctx.Locale.Tr "repo.pulls.showing_only_single_commit" (ShortSha .AfterCommitID)}} - <a href="{{$.Issue.Link}}/files?style={{if $.IsSplitStyle}}split{{else}}unified{{end}}&whitespace={{$.WhitespaceBehavior}}&show-outdated={{$.ShowOutdatedComments}}">{{ctx.Locale.Tr "repo.pulls.show_all_commits"}}</a></div> </div> {{else if and (not .IsShowingAllCommits) .PageIsPullFiles}} <div class="ui info message">