0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-24 22:12:53 +01:00

BeforeSourcePath should point to base commit (#18799)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
Jimmy Praet 2022-02-25 07:46:15 +01:00 committed by GitHub
parent f1c6cf7c51
commit e4ef61ee0f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -78,8 +78,8 @@ func setPathsCompareContext(ctx *context.Context, base, head *git.Commit, headOw
ctx.Data["SourcePath"] = SourceCommitURL(headOwner, headName, head)
ctx.Data["RawPath"] = RawCommitURL(headOwner, headName, head)
if base != nil {
ctx.Data["BeforeSourcePath"] = SourceCommitURL(headOwner, headName, head)
ctx.Data["BeforeRawPath"] = RawCommitURL(headOwner, headName, head)
ctx.Data["BeforeSourcePath"] = SourceCommitURL(headOwner, headName, base)
ctx.Data["BeforeRawPath"] = RawCommitURL(headOwner, headName, base)
}
}