mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-02 08:57:32 -04:00
Do not fetch all refs (#7837)
Which would unnecessarily slow down the pull compare operation.
This commit is contained in:
parent
89915ca8a0
commit
f3496c88b2
@ -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…
Reference in New Issue
Block a user