summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorKyle D <kdumontnu@gmail.com>2023-02-21 10:51:02 -0500
committerGitHub <noreply@github.com>2023-02-21 10:51:02 -0500
commit760cf419bacb757da5fb26c1440ce23050feddad (patch)
tree521accc64aea118435dad5c4c6f420c9a5581325 /templates
parent90982bffa5fe472d528577409cb77f85a745d1a0 (diff)
downloadgitea-760cf419bacb757da5fb26c1440ce23050feddad.tar.gz
gitea-760cf419bacb757da5fb26c1440ce23050feddad.zip
Use beforeCommit instead of baseCommit (#22949) (#22996)
Backport #22949 Fixes https://github.com/go-gitea/gitea/issues/22946 Probably related to https://github.com/go-gitea/gitea/issues/19530 Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/diff/box.tmpl2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl
index 8482c31cdc..78051f7cc9 100644
--- a/templates/repo/diff/box.tmpl
+++ b/templates/repo/diff/box.tmpl
@@ -71,7 +71,7 @@
<div id="diff-file-boxes" class="sixteen wide column">
{{range $i, $file := .Diff.Files}}
{{/*notice: the index of Diff.Files should not be used for element ID, because the index will be restarted from 0 when doing load-more for PRs with a lot of files*/}}
- {{$blobBase := call $.GetBlobByPathForCommit $.BaseCommit $file.OldName}}
+ {{$blobBase := call $.GetBlobByPathForCommit $.BeforeCommit $file.OldName}}
{{$blobHead := call $.GetBlobByPathForCommit $.HeadCommit $file.Name}}
{{$isImage := or (call $.IsBlobAnImage $blobBase) (call $.IsBlobAnImage $blobHead)}}
{{$isCsv := (call $.IsCsvFile $file)}}