summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-01-07 21:01:18 -0800
committerStan Hu <stanhu@gmail.com>2018-01-09 23:39:19 -0800
commit35d3411f774c8ad590e15180904a0493a774ec80 (patch)
treed78249f24ba437a9a5e57d1c5a383e335b59ad74 /app/models
parent3576d59ae95a61dd20e997a619dbc6c8e8a70276 (diff)
downloadgitlab-ce-35d3411f774c8ad590e15180904a0493a774ec80.tar.gz
Fix hooks not being set up properly for bare import Rake tasksh-fix-bare-import-hooks
Closes #41739
Diffstat (limited to 'app/models')
-rw-r--r--app/models/repository.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb
index 9c879e2006b..b36e756c07c 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -103,6 +103,10 @@ class Repository
"#<#{self.class.name}:#{@disk_path}>"
end
+ def create_hooks
+ Gitlab::Git::Repository.create_hooks(path_to_repo, Gitlab.config.gitlab_shell.hooks_path)
+ end
+
def commit(ref = 'HEAD')
return nil unless exists?
return ref if ref.is_a?(::Commit)