summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2018-01-11 11:35:50 +0000
committerSean McGivern <sean@mcgivern.me.uk>2018-01-11 11:35:50 +0000
commitac425c1528a160eb1609587de08a1510809fc383 (patch)
tree0199c1db2d5bce7e8b60ce3de34e285e18775750 /app
parent06713cb7b07f30eda8f67531387f7cb8801987b1 (diff)
parenta560f785f7f34b932c285365790a27d15bd100ec (diff)
downloadgitlab-ce-ac425c1528a160eb1609587de08a1510809fc383.tar.gz
Merge branch '4020-rebase-message' into 'master'
Resolve 'Rebase fails with "something went wrong" and huge ugly conflict error.' Closes #41820 See merge request gitlab-org/gitlab-ce!16326
Diffstat (limited to 'app')
-rw-r--r--app/services/merge_requests/rebase_service.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/app/services/merge_requests/rebase_service.rb b/app/services/merge_requests/rebase_service.rb
index 0d5a25fa28e..c0083cd6afd 100644
--- a/app/services/merge_requests/rebase_service.rb
+++ b/app/services/merge_requests/rebase_service.rb
@@ -1,12 +1,14 @@
module MergeRequests
class RebaseService < MergeRequests::WorkingCopyBaseService
+ REBASE_ERROR = 'Rebase failed. Please rebase locally'.freeze
+
def execute(merge_request)
@merge_request = merge_request
if rebase
success
else
- error('Failed to rebase. Should be done manually')
+ error(REBASE_ERROR)
end
end
@@ -22,8 +24,8 @@ module MergeRequests
true
rescue => e
- log_error('Failed to rebase branch:')
- log_error(e.message, save_message_on_model: true)
+ log_error(REBASE_ERROR, save_message_on_model: true)
+ log_error(e.message)
false
end
end