diff options
author | Jacob Vosmaer (GitLab) <jacob@gitlab.com> | 2017-09-19 17:09:10 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-09-19 17:09:10 +0000 |
commit | 75509fac17790bae546b2905aa684f85fdbd9c86 (patch) | |
tree | c4c81ad9857eb18f61597ff629b76fc3132ece17 /lib/gitlab/git.rb | |
parent | f13158a090066b7266096ae58506d0d7611b5600 (diff) | |
download | gitlab-ce-75509fac17790bae546b2905aa684f85fdbd9c86.tar.gz |
Prepare cherry-pick and revert for migration to Gitaly
Diffstat (limited to 'lib/gitlab/git.rb')
-rw-r--r-- | lib/gitlab/git.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/gitlab/git.rb b/lib/gitlab/git.rb index b4b6326cfdd..c78fe63f9b5 100644 --- a/lib/gitlab/git.rb +++ b/lib/gitlab/git.rb @@ -57,6 +57,15 @@ module Gitlab def version Gitlab::VersionInfo.parse(Gitlab::Popen.popen(%W(#{Gitlab.config.git.bin_path} --version)).first) end + + def check_namespace!(*objects) + expected_namespace = self.name + '::' + objects.each do |object| + unless object.class.name.start_with?(expected_namespace) + raise ArgumentError, "expected object in #{expected_namespace}, got #{object}" + end + end + end end end end |