mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	Do not fetch all refs (#7797)
Which would unnecessarily slow down the pull compare operation.
This commit is contained in:
		@@ -54,7 +54,7 @@ func (repo *Repository) GetCompareInfo(basePath, baseBranch, headBranch string)
 | 
			
		||||
	if repo.Path != basePath {
 | 
			
		||||
		// Add a temporary remote
 | 
			
		||||
		tmpRemote = strconv.FormatInt(time.Now().UnixNano(), 10)
 | 
			
		||||
		if err = repo.AddRemote(tmpRemote, basePath, true); err != nil {
 | 
			
		||||
		if err = repo.AddRemote(tmpRemote, basePath, false); err != nil {
 | 
			
		||||
			return nil, fmt.Errorf("AddRemote: %v", err)
 | 
			
		||||
		}
 | 
			
		||||
		defer func() {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user