Skip to content

Commit 6f21a94

Browse files
authored
BeforeSourcePath should point to base commit (#18880)
1 parent 8ebf0e6 commit 6f21a94

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
@@ -77,8 +77,8 @@ func setPathsCompareContext(ctx *context.Context, base, head *git.Commit, headOw
7777
ctx.Data["SourcePath"] = SourceCommitURL(headOwner, headName, head)
7878
ctx.Data["RawPath"] = RawCommitURL(headOwner, headName, head)
7979
if base != nil {
80-
ctx.Data["BeforeSourcePath"] = SourceCommitURL(headOwner, headName, head)
81-
ctx.Data["BeforeRawPath"] = RawCommitURL(headOwner, headName, head)
80+
ctx.Data["BeforeSourcePath"] = SourceCommitURL(headOwner, headName, base)
81+
ctx.Data["BeforeRawPath"] = RawCommitURL(headOwner, headName, base)
8282
}
8383
}
8484

0 commit comments

Comments
 (0)