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
Commit f4f4b419 authored by Douwe Maan's avatar Douwe Maan
Browse files

Merge branch 'gl_ee_issue_116' into 'master'

Add the ability to fetch remote repo without tags.

When fetching remote repo with tags the new remote tags are mixed in
with the local tags (all tags are saved under refs/tags), this affects
the UI of the Project given that we're showing up tags of a remote repo.

REF: https://gitlab.com/gitlab-org/gitlab-ee/issues/116

See merge request !46
parents 3efa55dc e5507fdd
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -180,11 +180,15 @@ class GitlabProjects
timeout = (ARGV.shift || 120).to_i
# fetch with --force ?
forced = (ARGV.shift == '--force')
forced = ARGV.include?('--force')
# fetch with --tags or --no-tags
tags_option = ARGV.include?('--no-tags') ? '--no-tags' : '--tags'
$logger.info "Fetching remote #{@name} for project #{@project_name}."
cmd = %W(git --git-dir=#{full_path} fetch #{@name} --tags)
cmd = %W(git --git-dir=#{full_path} fetch #{@name})
cmd << '--force' if forced
cmd << tags_option
pid = Process.spawn(*cmd)
begin
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