Do not fetch all refs (#7797)

Which would unnecessarily slow down the pull compare operation.
tokarchuk/v1.17
Mura Li 5 years ago committed by Lauris BH
parent c662f4ced8
commit 602155df7b
  1. 2
      modules/git/repo_compare.go

@ -54,7 +54,7 @@ func (repo *Repository) GetCompareInfo(basePath, baseBranch, headBranch string)
if repo.Path != basePath { if repo.Path != basePath {
// Add a temporary remote // Add a temporary remote
tmpRemote = strconv.FormatInt(time.Now().UnixNano(), 10) 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) return nil, fmt.Errorf("AddRemote: %v", err)
} }
defer func() { defer func() {

Loading…
Cancel
Save