Browse Source

Fix pull merge 500 error caused by git-fetch breaking behaviors (#8161)

tags/v1.11.0-dev
Mura Li techknowlogick 5 years ago
parent
commit
e272ab7892
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      modules/pull/merge.go

+ 1
- 1
modules/pull/merge.go View File

@@ -101,7 +101,7 @@ func Merge(pr *models.PullRequest, doer *models.User, baseGitRepo *git.Repositor
}

// Fetch head branch
if err := git.NewCommand("fetch", remoteRepoName, pr.HeadBranch).RunInDirPipeline(tmpBasePath, nil, &errbuf); err != nil {
if err := git.NewCommand("fetch", remoteRepoName, fmt.Sprintf("%s:refs/remotes/%s/%s", pr.HeadBranch, remoteRepoName, pr.HeadBranch)).RunInDirPipeline(tmpBasePath, nil, &errbuf); err != nil {
return fmt.Errorf("git fetch [%s -> %s]: %s", headRepoPath, tmpBasePath, errbuf.String())
}



Loading…
Cancel
Save