Skip to content

Commit fdab87e

Browse files
jpraetlunny
authored and
Stelios Malathouras
committed
BeforeSourcePath should point to base commit (go-gitea#18799)
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
1 parent 4b9005a commit fdab87e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

routers/web/repo/compare.go

+2-2
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)