Some small refactors (#36163)

This commit is contained in:
Lunny Xiao authored and GitHub committed 2025-12-15 11:55:44 -08:00
1 parent 26602fd207
commit da087270ff
6 files changed
+11 -14

No files matched your search

+1 -1
View File
@@ -33,7 +33,7 @@ func GetCompareInfo(ctx context.Context, baseRepo, headRepo *repo_model.Reposito
)
// We don't need a temporary remote for same repository.
if headGitRepo.Path != baseRepo.RepoPath() {
if baseRepo.ID != headRepo.ID {
// Add a temporary remote
tmpRemote = strconv.FormatInt(time.Now().UnixNano(), 10)
if err = gitrepo.GitRemoteAdd(ctx, headRepo, tmpRemote, baseRepo.RepoPath()); err != nil {