Improve refs parsing for git over http

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>