diff options
author | Stan Hu <stanhu@gmail.com> | 2015-11-06 10:47:04 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-11-06 10:47:04 +0300 |
commit | 40a9b1ce00ed4e4f03431b731ca5a6716356d5a6 (patch) | |
tree | c350d97b3500f817efcaf6ee48117c68eda39d8a /app | |
parent | 82aa54193f67b31400f06de372adfc25acc61c0c (diff) |
Fix bug where manually merged branches in a MR would end up with an empty diff
Closes #3314
Diffstat (limited to 'app')
-rw-r--r-- | app/services/merge_requests/refresh_service.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/services/merge_requests/refresh_service.rb b/app/services/merge_requests/refresh_service.rb index d68bc79ecc0..e180edb4bf3 100644 --- a/app/services/merge_requests/refresh_service.rb +++ b/app/services/merge_requests/refresh_service.rb @@ -7,17 +7,17 @@ module MergeRequests @branch_name = Gitlab::Git.ref_name(ref) find_new_commits + # Be sure to close outstanding MRs before reloading them to avoid generating an + # empty diff during a manual merge + close_merge_requests reload_merge_requests # Leave a system note if a branch was deleted/added if branch_added? || branch_removed? comment_mr_branch_presence_changed - comment_mr_with_commits - else - comment_mr_with_commits - close_merge_requests end + comment_mr_with_commits execute_mr_web_hooks true |