diff options
author | Jacob Vosmaer <jacob@gitlab.com> | 2017-08-22 14:54:14 +0300 |
---|---|---|
committer | Jacob Vosmaer <jacob@gitlab.com> | 2017-08-23 11:45:20 +0300 |
commit | 65f83941c39c14c2af9da5064393545ea2f7b3e5 (patch) | |
tree | c18f36d6ec757954ac7af3b9674bbb20b2ac45c6 /app | |
parent | 9b9309329207449ef022bdcf06bff5f8eae36032 (diff) |
Make gl_repository a G::G::Repository attribute
Diffstat (limited to 'app')
-rw-r--r-- | app/models/repository.rb | 2 | ||||
-rw-r--r-- | app/services/git_hooks_service.rb | 8 | ||||
-rw-r--r-- | app/services/git_operation_service.rb | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb index 3c5074e5157..062f532233f 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -1194,7 +1194,7 @@ class Repository end def initialize_raw_repository - Gitlab::Git::Repository.new(project.repository_storage, disk_path + '.git') + Gitlab::Git::Repository.new(project.repository_storage, disk_path + '.git', Gitlab::GlRepository.gl_repository(project, false)) end def circuit_breaker diff --git a/app/services/git_hooks_service.rb b/app/services/git_hooks_service.rb index e85007c26e0..c14133230da 100644 --- a/app/services/git_hooks_service.rb +++ b/app/services/git_hooks_service.rb @@ -3,9 +3,9 @@ class GitHooksService attr_accessor :oldrev, :newrev, :ref - def execute(committer, project, oldrev, newrev, ref) - @project = project - @gl_id = committer.gl_id + def execute(committer, repository, oldrev, newrev, ref) + @repository = repository + @gl_id = committer.gl_id @oldrev = oldrev @newrev = newrev @ref = ref @@ -26,7 +26,7 @@ class GitHooksService private def run_hook(name) - hook = Gitlab::Git::Hook.new(name, @project) + hook = Gitlab::Git::Hook.new(name, @repository) hook.trigger(@gl_id, oldrev, newrev, ref) end end diff --git a/app/services/git_operation_service.rb b/app/services/git_operation_service.rb index f7fce3d8a5d..d20e4ed9e88 100644 --- a/app/services/git_operation_service.rb +++ b/app/services/git_operation_service.rb @@ -123,7 +123,7 @@ class GitOperationService def with_hooks(ref, newrev, oldrev) GitHooksService.new.execute( committer, - repository.project, + repository, oldrev, newrev, ref) do |service| |