summaryrefslogtreecommitdiff
path: root/lib/gitlab/git_post_receive.rb
diff options
context:
space:
mode:
authorGabriel Mazetto <brodock@gmail.com>2017-05-03 04:36:13 +0200
committerGabriel Mazetto <brodock@gmail.com>2017-05-12 23:26:48 +0100
commitf661980904f718440cc700b7d1f38ea8bf0e5480 (patch)
tree7933eee3b85e6af5da9db8223b6d870d8395926f /lib/gitlab/git_post_receive.rb
parent8b17fb61b61b1f9707428c2333db2de29c4d3bcf (diff)
downloadgitlab-ce-f661980904f718440cc700b7d1f38ea8bf0e5480.tar.gz
Added repository_update hook
Diffstat (limited to 'lib/gitlab/git_post_receive.rb')
-rw-r--r--lib/gitlab/git_post_receive.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/gitlab/git_post_receive.rb b/lib/gitlab/git_post_receive.rb
index 0e14253ab4e..742118b76a8 100644
--- a/lib/gitlab/git_post_receive.rb
+++ b/lib/gitlab/git_post_receive.rb
@@ -13,6 +13,16 @@ module Gitlab
super(identifier, project, revision)
end
+ def changes_refs
+ return enum_for(:changes_refs) unless block_given?
+
+ changes.each do |change|
+ oldrev, newrev, ref = change.strip.split(' ')
+
+ yield oldrev, newrev, ref
+ end
+ end
+
private
def deserialize_changes(changes)