mirror of
https://github.com/go-gitea/gitea.git
synced 2025-12-20 11:18:36 +00:00
Some small refactors (#36163)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user