summaryrefslogtreecommitdiff
path: root/lib/gitlab/import_export/command_line_util.rb
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2016-07-28 16:28:12 +0200
committerJames Lopez <james@jameslopez.es>2016-07-28 17:41:17 +0200
commit32d8aa6d5e1a6dbcd861a4e5baa24c3a873b57fe (patch)
treeaa8b7b86303ad1bfe9ce8723447dad6896d12893 /lib/gitlab/import_export/command_line_util.rb
parent273bea975baabfbdcd831a0ff525f2ace48fb750 (diff)
downloadgitlab-ce-32d8aa6d5e1a6dbcd861a4e5baa24c3a873b57fe.tar.gz
fix repo hooks missing on importfix/import-project-hooks
fix spec and added changelog
Diffstat (limited to 'lib/gitlab/import_export/command_line_util.rb')
-rw-r--r--lib/gitlab/import_export/command_line_util.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/gitlab/import_export/command_line_util.rb b/lib/gitlab/import_export/command_line_util.rb
index 5dd0e34c18e..e522a0fc8f6 100644
--- a/lib/gitlab/import_export/command_line_util.rb
+++ b/lib/gitlab/import_export/command_line_util.rb
@@ -17,6 +17,10 @@ module Gitlab
execute(%W(#{git_bin_path} clone --bare #{bundle_path} #{repo_path}))
end
+ def git_restore_hooks
+ execute(%W(#{Gitlab.config.gitlab_shell.path}/bin/create-hooks) + repository_storage_paths_args)
+ end
+
private
def tar_with_options(archive:, dir:, options:)
@@ -45,6 +49,10 @@ module Gitlab
FileUtils.copy_entry(source, destination)
true
end
+
+ def repository_storage_paths_args
+ Gitlab.config.repositories.storages.values
+ end
end
end
end