Fix bug when compare in the pull request (#36363)

The pull request comparison should not use `direct compare`.
This commit is contained in:
Lunny Xiao authored and GitHub committed 2026-01-14 16:56:23 +00:00
1 parent 8a98ac2213
commit 07ac29da32
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -1077,7 +1077,7 @@ func GetPullCommits(ctx context.Context, baseGitRepo *git.Repository, doer *user
if pull.HasMerged {
baseBranch = pull.MergeBase
}
compareInfo, err := git_service.GetCompareInfo(ctx, pull.BaseRepo, pull.BaseRepo, baseGitRepo, git.RefNameFromBranch(baseBranch), git.RefName(pull.GetGitHeadRefName()), true, false)
compareInfo, err := git_service.GetCompareInfo(ctx, pull.BaseRepo, pull.BaseRepo, baseGitRepo, git.RefNameFromBranch(baseBranch), git.RefName(pull.GetGitHeadRefName()), false, false)
if err != nil {
return nil, "", err
}