diff options
author | Stan Hu <stanhu@gmail.com> | 2019-05-14 14:37:15 -0500 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-05-15 21:34:59 -0700 |
commit | 5632079c3684562aea890123182bd43648149b55 (patch) | |
tree | 327406be44c1893447da6d486ac816a11b80b23a /app | |
parent | 3d2edaac04ec1e4d5074a43249c11cf6e8a8eecf (diff) | |
download | gitlab-ce-5632079c3684562aea890123182bd43648149b55.tar.gz |
Properly clear the merge error upon rebase failuresh-fix-rebase-error-clearing
If `merge_error` is ever set after a failure, it is never cleared, even
after a subsequent, successful rebase. We now clear this field whenever
a successful rebase occurs.
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/56139
Diffstat (limited to 'app')
-rw-r--r-- | app/models/repository.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb index 1c02e68f2f6..f540b00a849 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -1050,7 +1050,7 @@ class Repository # To support the full deprecated behaviour, set the # `rebase_commit_sha` for the merge_request here and return the value - merge_request.update(rebase_commit_sha: rebase_sha) + merge_request.update(rebase_commit_sha: rebase_sha, merge_error: nil) rebase_sha end @@ -1069,7 +1069,7 @@ class Repository remote_repository: merge_request.target_project.repository.raw, remote_branch: merge_request.target_branch ) do |commit_id| - merge_request.update!(rebase_commit_sha: commit_id) + merge_request.update!(rebase_commit_sha: commit_id, merge_error: nil) end end end |