diff options
author | Rémy Coutable <remy@rymai.me> | 2018-01-25 17:52:01 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-01-25 17:52:01 +0000 |
commit | 26c4dea7ad37f5680ada812e212274ebd8473a78 (patch) | |
tree | e94cbb24402a46947996ae1783995d9f11ae5524 /lib/gitlab/git | |
parent | e4c2ce6f67ffdaa88ee394c93e07f175f6e309eb (diff) | |
parent | 6d6f7536bd9b5bcbf94dfbe15cc86e84d06527f5 (diff) | |
download | gitlab-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.rb | 2 |
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 |