As we reevaluate how to best support and maintain Staging Ref in the future, we encourage development teams using this environment to highlight their use cases in the following issue: https://gitlab.com/gitlab-com/gl-infra/software-delivery/framework/software-delivery-framework-issue-tracker/-/issues/36.

Skip to content
Snippets Groups Projects
Unverified Commit 0aa50638 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

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

parent d61bfbba
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -168,11 +168,6 @@ class GitlabProjects
return false
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|
f.write("ref: refs/heads/#{new_head}")
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment