Skip to content

Commit

Permalink
Fix pull merge 500 error caused by git-fetch breaking behaviors (#8194)
Browse files Browse the repository at this point in the history
  • Loading branch information
typeless authored and techknowlogick committed Sep 16, 2019
1 parent d78aa18 commit 9e8df4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/pull/merge.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}

Expand Down

0 comments on commit 9e8df4b

Please sign in to comment.