0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-05-12 22:03:30 +02:00

Fix merge error

This commit is contained in:
Lunny Xiao 2026-01-17 10:45:31 -08:00
parent 19ca3cb3cc
commit f649d09819
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A

View File

@ -65,7 +65,7 @@ func GetCompareInfo(ctx context.Context, baseRepo, headRepo *repo_model.Reposito
// if they are not the same repository, then we need to fetch the base commit into the head repository
// because we will use headGitRepo in the following code
if baseRepo.ID != headRepo.ID {
exist := headGitRepo.IsCommitExist(compareInfo.BaseCommitID)
exist := headGitRepo.IsReferenceExist(compareInfo.BaseCommitID)
if !exist {
if err := gitrepo.FetchRemoteCommit(ctx, headRepo, baseRepo, compareInfo.BaseCommitID); err != nil {
return nil, fmt.Errorf("FetchRemoteCommit: %w", err)