Hide hooks stuff

This commit is contained in:
Jacob Vosmaer 2018-01-04 16:37:18 +01:00
parent 44d15e4143
commit 80242f246b
2 changed files with 2 additions and 3 deletions

View File

@ -17,6 +17,7 @@ module Gitlab
def git_clone_bundle(repo_path:, bundle_path:)
execute(%W(#{git_bin_path} clone --bare -- #{bundle_path} #{repo_path}))
Gitlab::Git::Repository.create_hooks(repo_path, File.expand_path(Gitlab.config.gitlab_shell.hooks_path))
end
def mkdir_p(path)

View File

@ -13,9 +13,7 @@ module Gitlab
def restore
return true unless File.exist?(@path_to_bundle)
repo_path = @project.repository.path_to_repo
git_clone_bundle(repo_path: repo_path, bundle_path: @path_to_bundle)
Gitlab::Git::Repository.create_hooks(repo_path, File.expand_path(Gitlab.config.gitlab_shell.hooks_path))
git_clone_bundle(repo_path: @project.repository.path_to_repo, bundle_path: @path_to_bundle)
rescue => e
@shared.error(e)
false