summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2018-04-06 12:16:51 +0100
committerSean McGivern <sean@gitlab.com>2018-04-06 12:16:51 +0100
commit30bca22d0841bfb2fdb6f5dc5970a4486614de4c (patch)
tree87dd0319a34894e3be161498e981bfe4f4b08251 /lib
parentca330f7ea30b368b928f5468a1f53264d74aa8aa (diff)
downloadgitlab-ce-30bca22d0841bfb2fdb6f5dc5970a4486614de4c.tar.gz
Fix 500 error when MR from fork has conflicts but worker has not runfix-500-error-when-mr-ref-is-not-yet-fetched
If the ref hasn't been fetched into the target repository yet, this will fail with a Rugged::ReferencError (assuming we're not using Gitaly). We should handle this in the same way as a missing ref.
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/git/conflict/resolver.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/git/conflict/resolver.rb b/lib/gitlab/git/conflict/resolver.rb
index 07b7e811a34..c3cb0264112 100644
--- a/lib/gitlab/git/conflict/resolver.rb
+++ b/lib/gitlab/git/conflict/resolver.rb
@@ -23,7 +23,7 @@ module Gitlab
end
rescue GRPC::FailedPrecondition => e
raise Gitlab::Git::Conflict::Resolver::ConflictSideMissing.new(e.message)
- rescue Rugged::OdbError, GRPC::BadStatus => e
+ rescue Rugged::ReferenceError, Rugged::OdbError, GRPC::BadStatus => e
raise Gitlab::Git::CommandError.new(e)
end