summaryrefslogtreecommitdiff
path: root/lib/gitlab/import_export/repo_restorer.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/repo_restorer.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/repo_restorer.rb')
-rw-r--r--lib/gitlab/import_export/repo_restorer.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/gitlab/import_export/repo_restorer.rb b/lib/gitlab/import_export/repo_restorer.rb
index f84de652a57..6d9379acf25 100644
--- a/lib/gitlab/import_export/repo_restorer.rb
+++ b/lib/gitlab/import_export/repo_restorer.rb
@@ -14,7 +14,7 @@ module Gitlab
FileUtils.mkdir_p(path_to_repo)
- git_unbundle(repo_path: path_to_repo, bundle_path: @path_to_bundle)
+ git_unbundle(repo_path: path_to_repo, bundle_path: @path_to_bundle) && repo_restore_hooks
rescue => e
@shared.error(e)
false
@@ -29,6 +29,16 @@ module Gitlab
def path_to_repo
@project.repository.path_to_repo
end
+
+ def repo_restore_hooks
+ return true if wiki?
+
+ git_restore_hooks
+ end
+
+ def wiki?
+ @project.class.name == 'ProjectWiki'
+ end
end
end
end