Commit 06feb3c4 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Cleanup parsed refs for git over HTTP

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 7f685986
...@@ -125,7 +125,15 @@ module Grack ...@@ -125,7 +125,15 @@ module Grack
# Need to reset seek point # Need to reset seek point
@request.body.rewind @request.body.rewind
input.force_encoding('ascii-8bit').scan(/refs\/heads\/([\/\w\.-]+)/n).flatten.compact
# Parse refs
refs = input.force_encoding('ascii-8bit').scan(/refs\/heads\/([\/\w\.-]+)/n).flatten.compact
# Cleanup grabare from refs
# if push to multiple branches
refs.map do |ref|
ref.gsub(/0000PACK.*/, "")
end
end end
end end
end end
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