diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-09 09:06:19 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-09 09:06:19 +0000 |
commit | 3744bcc0d10d24104e39985b6833a0ec51791c0a (patch) | |
tree | ecad3a8435a74bd618acd591762906429f88bfd4 /lib/gitlab/shell.rb | |
parent | 78adf0c5cc2534908e3f16a9b8abf06509444cf3 (diff) | |
download | gitlab-ce-3744bcc0d10d24104e39985b6833a0ec51791c0a.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/shell.rb')
-rw-r--r-- | lib/gitlab/shell.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/gitlab/shell.rb b/lib/gitlab/shell.rb index 7722480903d..125d0d1cfbb 100644 --- a/lib/gitlab/shell.rb +++ b/lib/gitlab/shell.rb @@ -297,6 +297,12 @@ module Gitlab end # rubocop: enable CodeReuse/ActiveRecord + def repository_exists?(storage, dir_name) + Gitlab::Git::Repository.new(storage, dir_name, nil, nil).exists? + rescue GRPC::Internal + false + end + def hooks_path File.join(gitlab_shell_path, 'hooks') end |