From 582ad338d79fe129d079c2f14cf175adace53849 Mon Sep 17 00:00:00 2001 From: Alexander McRae Date: Thu, 6 Mar 2025 18:40:39 -0800 Subject: [PATCH] Use correct start and end commits for GetDiffTree (#33816) Fixes https://github.com/go-gitea/gitea/pull/33514#issuecomment-2702814099 Co-authored-by: wxiaoguang --- routers/web/repo/pull.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/web/repo/pull.go b/routers/web/repo/pull.go index 1d37fd8603..71057ec653 100644 --- a/routers/web/repo/pull.go +++ b/routers/web/repo/pull.go @@ -820,7 +820,7 @@ func viewPullFiles(ctx *context.Context, specifiedStartCommit, specifiedEndCommi if !fileOnly { // note: use mergeBase is set to false because we already have the merge base from the pull request info - diffTree, err := gitdiff.GetDiffTree(ctx, gitRepo, false, pull.MergeBase, headCommitID) + diffTree, err := gitdiff.GetDiffTree(ctx, gitRepo, false, startCommitID, endCommitID) if err != nil { ctx.ServerError("GetDiffTree", err) return