diff options
author | Jimmy Praet | 2022-02-25 07:45:20 +0100 |
---|---|---|
committer | GitHub | 2022-02-25 14:45:20 +0800 |
commit | 6f21a94d1885086ffdb56ba5ea2137820d469164 (patch) | |
tree | 06b470b3edc7ee5ae820959c9e83679cac76e088 | |
parent | 8ebf0e68ec2899584cef9cf0674a2c4650c00823 (diff) |
BeforeSourcePath should point to base commit (#18880)
-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 7ddeee8ab..e0855b183 100644 --- a/routers/web/repo/compare.go +++ b/routers/web/repo/compare.go @@ -77,8 +77,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) } } |