summaryrefslogtreecommitdiff
path: root/lib/gitlab_projects.rb
diff options
context:
space:
mode:
authorJacob Vosmaer (GitLab) <jacob@gitlab.com>2016-04-28 16:07:06 +0000
committerJacob Vosmaer (GitLab) <jacob@gitlab.com>2016-04-28 16:07:06 +0000
commit9bf99423613caeff16a548632de2c8241c09f404 (patch)
tree6232425646e18a4e5f98baca7020cdaa719ae7f0 /lib/gitlab_projects.rb
parent3f942ef589a4b9bc1d9ed7fd0aaf9e186be57935 (diff)
parent1f0a77ca564ee4aaf47f9d78c76e3b39c3d0f713 (diff)
downloadgitlab-shell-9bf99423613caeff16a548632de2c8241c09f404.tar.gz
Merge branch 'remove-update-head' into 'master'
Remove the update-head command since GitLab doesn't use it anymore It looks like we tend to remove commands that are not used by GitLab anymore (see gitlab-org/gitlab-shell!26) and the `update-head` command will soon be in that case (see https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3705), so I think we should remove it from here too. Note: I'm setting this as a WIP to ensure this doesn't get merged since the GitLab MR is not merged at that moment. See merge request !51
Diffstat (limited to 'lib/gitlab_projects.rb')
-rw-r--r--lib/gitlab_projects.rb17
1 files changed, 0 insertions, 17 deletions
diff --git a/lib/gitlab_projects.rb b/lib/gitlab_projects.rb
index f0e0773..767ab79 100644
--- a/lib/gitlab_projects.rb
+++ b/lib/gitlab_projects.rb
@@ -58,7 +58,6 @@ class GitlabProjects
when 'import-project'; import_project
when 'fork-project'; fork_project
when 'fetch-remote'; fetch_remote
- when 'update-head'; update_head
when 'push-branches'; push_branches
when 'delete-remote-branches'; delete_remote_branches
when 'list-remote-tags'; list_remote_tags
@@ -314,22 +313,6 @@ class GitlabProjects
system(*cmd) && self.class.create_hooks(full_destination_path)
end
- def update_head
- new_head = ARGV.shift
-
- unless new_head
- $logger.error "update-head failed: no branch provided."
- return false
- end
-
- File.open(File.join(full_path, 'HEAD'), 'w') do |f|
- f.write("ref: refs/heads/#{new_head}")
- end
-
- $logger.info "Update head in project #{project_name} to <#{new_head}>."
- true
- end
-
def gc
$logger.info "Running git gc for <#{full_path}>."
unless File.exists?(full_path)