From 0aa5063851fe2c1386fd07e6898734e0d5c9465c Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 6 Nov 2013 18:19:27 +0200 Subject: Prevent update-head fail if branch not present in refs/head Signed-off-by: Dmitriy Zaporozhets --- lib/gitlab_projects.rb | 5 ----- 1 file changed, 5 deletions(-) (limited to 'lib/gitlab_projects.rb') diff --git a/lib/gitlab_projects.rb b/lib/gitlab_projects.rb index 0dd56be..3617bb2 100644 --- a/lib/gitlab_projects.rb +++ b/lib/gitlab_projects.rb @@ -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 -- cgit v1.2.1