Commit 80242f24 authored by Jacob Vosmaer's avatar Jacob Vosmaer

Hide hooks stuff

parent 44d15e41
......@@ -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)
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment