diff options
author | zeripath <art27@cantab.net> | 2019-07-25 19:05:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-25 19:05:51 +0100 |
commit | 6485962dd53d9704f0a2b438257f722a306beedd (patch) | |
tree | 1f75ed04bb54afe5d266a864b8b06426296b3418 /modules | |
parent | 734aa965088fb72330f4ad744c187c614cce3d8b (diff) | |
download | gitea-6485962dd53d9704f0a2b438257f722a306beedd.tar.gz gitea-6485962dd53d9704f0a2b438257f722a306beedd.zip |
Fix panic on push at #7611 (#7615)
* Fix panic in #7611
Use pr.IssueID instead of pr.Issue.ID as Issue may not be loaded and is unnecessary
* Only fetch the head branch from the remote
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 3b653aac2d..3e5721ad72 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).RunInDirPipeline(tmpBasePath, nil, &errbuf); err != nil { + if err := git.NewCommand("fetch", remoteRepoName, pr.HeadBranch).RunInDirPipeline(tmpBasePath, nil, &errbuf); err != nil { return fmt.Errorf("git fetch [%s -> %s]: %s", headRepoPath, tmpBasePath, errbuf.String()) } |