Commit 0aa50638 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Prevent update-head fail if branch not present in refs/head

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent d61bfbba
...@@ -168,11 +168,6 @@ class GitlabProjects ...@@ -168,11 +168,6 @@ class GitlabProjects
return false return false
end end
unless File.exists?(File.join(full_path, 'refs/heads', new_head))
$logger.error "update-head failed: specified branch does not exist in ref/heads."
return false
end
File.open(File.join(full_path, 'HEAD'), 'w') do |f| File.open(File.join(full_path, 'HEAD'), 'w') do |f|
f.write("ref: refs/heads/#{new_head}") f.write("ref: refs/heads/#{new_head}")
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