diff options
author | Jimmy Praet <jimmy.praet@telenet.be> | 2022-02-25 07:46:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-25 14:46:15 +0800 |
commit | e4ef61ee0fc319c5329dcb8e6cd961bb297730d1 (patch) | |
tree | 9252d8a855921674805ca79b41b8cbea4f1db346 /routers/web | |
parent | f1c6cf7c51929406a198ec35403fc3ea790ebeb3 (diff) | |
download | gitea-e4ef61ee0fc319c5329dcb8e6cd961bb297730d1.tar.gz gitea-e4ef61ee0fc319c5329dcb8e6cd961bb297730d1.zip |
BeforeSourcePath should point to base commit (#18799)
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'routers/web')
-rw-r--r-- | routers/web/repo/compare.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/web/repo/compare.go b/routers/web/repo/compare.go index 9cc87d811e..80d4fee19e 100644 --- a/routers/web/repo/compare.go +++ b/routers/web/repo/compare.go @@ -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) } } |