summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2018-01-04 16:37:18 +0100
committerJacob Vosmaer <jacob@gitlab.com>2018-01-04 16:37:18 +0100
commit80242f246b69a803120bc06527b80601fafc526c (patch)
tree002b0489dea52bf1fbdb6a59bb90c3fe4018053b
parent44d15e414348ab7befaa22636b85d1c0d9064d08 (diff)
downloadgitlab-ce-80242f246b69a803120bc06527b80601fafc526c.tar.gz
Hide hooks stuff
-rw-r--r--lib/gitlab/import_export/command_line_util.rb1
-rw-r--r--lib/gitlab/import_export/repo_restorer.rb4
2 files changed, 2 insertions, 3 deletions
diff --git a/lib/gitlab/import_export/command_line_util.rb b/lib/gitlab/import_export/command_line_util.rb
index 349f17cf0f8..dd5d35feab9 100644
--- a/lib/gitlab/import_export/command_line_util.rb
+++ b/lib/gitlab/import_export/command_line_util.rb
@@ -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)
diff --git a/lib/gitlab/import_export/repo_restorer.rb b/lib/gitlab/import_export/repo_restorer.rb
index a7e00c71990..d0e5cfcfd3e 100644
--- a/lib/gitlab/import_export/repo_restorer.rb
+++ b/lib/gitlab/import_export/repo_restorer.rb
@@ -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