diff options
author | Mura Li <typeless@users.noreply.github.com> | 2019-09-16 11:03:08 +0800 |
---|---|---|
committer | techknowlogick <techknowlogick@gitea.io> | 2019-09-15 23:03:08 -0400 |
commit | a5f87feefd0622115611873da276d4725b6379bb (patch) | |
tree | ecc9c0a73f27180b31d8a812e1b9562ac54aeda4 /modules | |
parent | 89648746a5acd4892a026d2962ff217280dbdf5b (diff) | |
download | gitea-a5f87feefd0622115611873da276d4725b6379bb.tar.gz gitea-a5f87feefd0622115611873da276d4725b6379bb.zip |
Fix pull merge 500 error caused by git-fetch breaking behaviors (#8161)
Diffstat (limited to 'modules')
-rw-r--r-- | modules/pull/merge.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/pull/merge.go b/modules/pull/merge.go index 89f3e9fd2c..6150c1518e 100644 --- a/modules/pull/merge.go +++ b/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()) } |