Commit 05f4e48a authored by Lin Jen-Shin's avatar Lin Jen-Shin

Make GitHooksService#execute return block value

Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7237#note_21627207
parent 9bb4cd75
......@@ -18,10 +18,10 @@ class GitHooksService
end
end
yield self
yield(self).tap do
run_hook('post-receive')
end
end
private
......
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment