summaryrefslogtreecommitdiff
path: root/app/services/git_operation_service.rb
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-01-26 19:35:19 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-01-26 19:35:19 +0800
commit05f4e48a4c761e13faf080e2d33fb8cc9886f723 (patch)
treee2a5e6ec86322294efc0f025aef824d85db89938 /app/services/git_operation_service.rb
parent9bb4cd75ad51f61a53a2bef205be2b4b24acc513 (diff)
downloadgitlab-ce-05f4e48a4c761e13faf080e2d33fb8cc9886f723.tar.gz
Make GitHooksService#execute return block value
Feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7237#note_21627207
Diffstat (limited to 'app/services/git_operation_service.rb')
-rw-r--r--app/services/git_operation_service.rb6
1 files changed, 1 insertions, 5 deletions
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)