浏览代码

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

tags/v1.9.4
Mura Li 4 年前
父节点
当前提交
9e8df4b838
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      modules/pull/merge.go

+ 1
- 1
modules/pull/merge.go 查看文件

@@ -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())
}


正在加载...
取消
保存