summaryrefslogtreecommitdiff
path: root/lib/gitlab/git
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2018-01-25 17:52:01 +0000
committerRémy Coutable <remy@rymai.me>2018-01-25 17:52:01 +0000
commit26c4dea7ad37f5680ada812e212274ebd8473a78 (patch)
treee94cbb24402a46947996ae1783995d9f11ae5524 /lib/gitlab/git
parente4c2ce6f67ffdaa88ee394c93e07f175f6e309eb (diff)
parent6d6f7536bd9b5bcbf94dfbe15cc86e84d06527f5 (diff)
downloadgitlab-ce-26c4dea7ad37f5680ada812e212274ebd8473a78.tar.gz
Merge branch 'lint-rugged' into 'master'
Add a lint check to restrict use of Rugged See merge request gitlab-org/gitlab-ce!16656
Diffstat (limited to 'lib/gitlab/git')
-rw-r--r--lib/gitlab/git/repository.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb
index d6436c8c8a6..5333766c338 100644
--- a/lib/gitlab/git/repository.rb
+++ b/lib/gitlab/git/repository.rb
@@ -563,6 +563,8 @@ module Gitlab
return false if ancestor_id.nil? || descendant_id.nil?
merge_base_commit(ancestor_id, descendant_id) == ancestor_id
+ rescue Rugged::OdbError
+ false
end
# Returns true is +from+ is direct ancestor to +to+, otherwise false