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

Hide hooks stuff

parent 44d15e41
...@@ -17,6 +17,7 @@ module Gitlab ...@@ -17,6 +17,7 @@ module Gitlab
def git_clone_bundle(repo_path:, bundle_path:) def git_clone_bundle(repo_path:, bundle_path:)
execute(%W(#{git_bin_path} clone --bare -- #{bundle_path} #{repo_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 end
def mkdir_p(path) def mkdir_p(path)
......
...@@ -13,9 +13,7 @@ module Gitlab ...@@ -13,9 +13,7 @@ module Gitlab
def restore def restore
return true unless File.exist?(@path_to_bundle) return true unless File.exist?(@path_to_bundle)
repo_path = @project.repository.path_to_repo git_clone_bundle(repo_path: @project.repository.path_to_repo, bundle_path: @path_to_bundle)
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))
rescue => e rescue => e
@shared.error(e) @shared.error(e)
false 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