summaryrefslogtreecommitdiff
path: root/lib/gitlab/git.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-01-15 10:26:33 -0800
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-01-15 10:26:33 -0800
commita0d4235c04e8f47e8625a6f46d64b65df599b370 (patch)
tree70bf707c3fccb30c5299bbaf7d820787ad22c66f /lib/gitlab/git.rb
parent1e0f36b42a7e8fe8a4549b31233262fedfda742c (diff)
downloadgitlab-ce-a0d4235c04e8f47e8625a6f46d64b65df599b370.tar.gz
Send checkout sha for web hooks and services
Diffstat (limited to 'lib/gitlab/git.rb')
-rw-r--r--lib/gitlab/git.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/git.rb b/lib/gitlab/git.rb
index 67aca5e36e9..4a712c6345f 100644
--- a/lib/gitlab/git.rb
+++ b/lib/gitlab/git.rb
@@ -1,5 +1,9 @@
module Gitlab
module Git
BLANK_SHA = '0' * 40
+
+ def self.extract_ref_name(ref)
+ ref.gsub(/\Arefs\/(tags|heads)\//, '')
+ end
end
end