Skip to content

Commit c697b51

Browse files
committed
Merge remote-tracking branch 'giteaofficial/main'
* giteaofficial/main: BeforeSourcePath should point to base commit (go-gitea#18799)
2 parents 85feb59 + e4ef61e commit c697b51

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

routers/web/repo/compare.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ func setPathsCompareContext(ctx *context.Context, base, head *git.Commit, headOw
7878
ctx.Data["SourcePath"] = SourceCommitURL(headOwner, headName, head)
7979
ctx.Data["RawPath"] = RawCommitURL(headOwner, headName, head)
8080
if base != nil {
81-
ctx.Data["BeforeSourcePath"] = SourceCommitURL(headOwner, headName, head)
82-
ctx.Data["BeforeRawPath"] = RawCommitURL(headOwner, headName, head)
81+
ctx.Data["BeforeSourcePath"] = SourceCommitURL(headOwner, headName, base)
82+
ctx.Data["BeforeRawPath"] = RawCommitURL(headOwner, headName, base)
8383
}
8484
}
8585

0 commit comments

Comments
 (0)