diff options
| author | Ruben Davila <rdavila84@gmail.com> | 2016-11-29 22:12:19 -0500 |
|---|---|---|
| committer | Ruben Davila <rdavila84@gmail.com> | 2016-11-29 22:12:19 -0500 |
| commit | 2bca5ccbfc6e35b9852ca5af117744d3a9a45422 (patch) | |
| tree | 19014d95f903e6df72f4fec470be7e34671dbdef /lib/gitlab_projects.rb | |
| parent | d7428a5a88ba4e204e0d1c6a9b6c12c070a41c8f (diff) | |
| download | gitlab-shell-2bca5ccbfc6e35b9852ca5af117744d3a9a45422.tar.gz | |
Fetch repositories with --prune option by default.add-prune-option-to-fetch-command
This will allow us to not recreate branches that has been deleted on the upstream and the mirror.
Diffstat (limited to 'lib/gitlab_projects.rb')
| -rw-r--r-- | lib/gitlab_projects.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/gitlab_projects.rb b/lib/gitlab_projects.rb index 60addc7..505b49e 100644 --- a/lib/gitlab_projects.rb +++ b/lib/gitlab_projects.rb @@ -205,6 +205,7 @@ class GitlabProjects $logger.info "Fetching remote #{@name} for project #{@project_name}." cmd = %W(git --git-dir=#{full_path} fetch #{@name}) + cmd << '--prune' cmd << '--force' if forced cmd << tags_option pid = Process.spawn(*cmd) |
