diff options
author | zeripath <art27@cantab.net> | 2021-04-10 09:27:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-10 09:27:29 +0100 |
commit | 84f5a0bc62568b6d0a67969e460f4d41339a07d6 (patch) | |
tree | 482b1254ec65ad3c1c001d4e9229c309a7ad7cf9 /services/pull/merge.go | |
parent | e375cbfd464e12a704c3c1325315a0381ab877a7 (diff) | |
download | gitea-84f5a0bc62568b6d0a67969e460f4d41339a07d6.tar.gz gitea-84f5a0bc62568b6d0a67969e460f4d41339a07d6.zip |
Always set the merge base used to merge the commit (#15352)
The issue is that the TestPatch will reset the PR MergeBase - and it is possible for TestPatch to update the MergeBase whilst a merge is ongoing. The ensuing merge will then complete but it doesn't re-set the MergeBase it used to merge the PR.
Fixes the intermittent error in git test.
Signed-off-by: Andrew Thornton art27@cantab.net
Diffstat (limited to 'services/pull/merge.go')
-rw-r--r-- | services/pull/merge.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/services/pull/merge.go b/services/pull/merge.go index 518ffa4849..7e6a214b87 100644 --- a/services/pull/merge.go +++ b/services/pull/merge.go @@ -64,7 +64,7 @@ func Merge(pr *models.PullRequest, doer *models.User, baseGitRepo *git.Repositor pr.Merger = doer pr.MergerID = doer.ID - if _, err = pr.SetMerged(); err != nil { + if _, err := pr.SetMerged(); err != nil { log.Error("setMerged [%d]: %v", pr.ID, err) } |