From f3496c88b2fa9180e80ffb0070be0ed04c0b9581 Mon Sep 17 00:00:00 2001 From: Mura Li Date: Tue, 13 Aug 2019 19:03:01 +0800 Subject: [PATCH] Do not fetch all refs (#7837) Which would unnecessarily slow down the pull compare operation. --- modules/git/repo_compare.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/git/repo_compare.go b/modules/git/repo_compare.go index 7d66a2dc07..677201c5e0 100644 --- a/modules/git/repo_compare.go +++ b/modules/git/repo_compare.go @@ -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() {