Commit 6bf9a57c authored by Rémy Coutable's avatar Rémy Coutable

Revert "Remove unused #list_remote_tags"

This reverts commit f5e87590.
Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent c73b6a1c
v3.0.0 v3.0.0
- Remove list-remote-tags command (Robert Schilling)
- Remove rm-tag command (Robert Schilling) - Remove rm-tag command (Robert Schilling)
- Remove create-branch and rm-branch commands (Robert Schilling) - Remove create-branch and rm-branch commands (Robert Schilling)
- Update PostReceive worker so it logs a unique JID in Sidekiq - Update PostReceive worker so it logs a unique JID in Sidekiq
......
...@@ -61,6 +61,7 @@ class GitlabProjects ...@@ -61,6 +61,7 @@ class GitlabProjects
when 'update-head'; update_head when 'update-head'; update_head
when 'push-branches'; push_branches when 'push-branches'; push_branches
when 'delete-remote-branches'; delete_remote_branches when 'delete-remote-branches'; delete_remote_branches
when 'list-remote-tags'; list_remote_tags
when 'gc'; gc when 'gc'; gc
else else
$logger.warn "Attempt to execute invalid gitlab-projects command #{@command.inspect}." $logger.warn "Attempt to execute invalid gitlab-projects command #{@command.inspect}."
...@@ -71,6 +72,27 @@ class GitlabProjects ...@@ -71,6 +72,27 @@ class GitlabProjects
protected protected
def list_remote_tags
remote_name = ARGV.shift
tag_list, exit_code, error = nil
cmd = %W(git --git-dir=#{full_path} ls-remote --tags #{remote_name})
Open3.popen3(*cmd) do |stdin, stdout, stderr, wait_thr|
tag_list = stdout.read
error = stderr.read
exit_code = wait_thr.value.exitstatus
end
if exit_code.zero?
puts tag_list
true
else
puts error
false
end
end
def push_branches def push_branches
remote_name = ARGV.shift remote_name = ARGV.shift
......
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