summaryrefslogtreecommitdiff
path: root/app/services
diff options
context:
space:
mode:
Diffstat (limited to 'app/services')
-rw-r--r--app/services/git_hooks_service.rb6
-rw-r--r--app/services/git_operation_service.rb6
2 files changed, 4 insertions, 8 deletions
diff --git a/app/services/git_hooks_service.rb b/app/services/git_hooks_service.rb
index 6cd3908d43a..d222d1e63aa 100644
--- a/app/services/git_hooks_service.rb
+++ b/app/services/git_hooks_service.rb
@@ -18,9 +18,9 @@ class GitHooksService
end
end
- yield self
-
- run_hook('post-receive')
+ yield(self).tap do
+ run_hook('post-receive')
+ end
end
private
diff --git a/app/services/git_operation_service.rb b/app/services/git_operation_service.rb
index 2b2ba0870a4..df9c393844d 100644
--- a/app/services/git_operation_service.rb
+++ b/app/services/git_operation_service.rb
@@ -107,8 +107,6 @@ class GitOperationService
end
def with_hooks(ref, newrev, oldrev)
- result = nil
-
GitHooksService.new.execute(
user,
repository.path_to_repo,
@@ -116,10 +114,8 @@ class GitOperationService
newrev,
ref) do |service|
- result = yield(service) if block_given?
+ yield(service)
end
-
- result
end
def update_ref(ref, newrev, oldrev)