diff --git a/services/git/compare.go b/services/git/compare.go index 9e4645c5b1..6c49fff26a 100644 --- a/services/git/compare.go +++ b/services/git/compare.go @@ -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)