From 2bca5ccbfc6e35b9852ca5af117744d3a9a45422 Mon Sep 17 00:00:00 2001 From: Ruben Davila Date: Tue, 29 Nov 2016 22:12:19 -0500 Subject: Fetch repositories with --prune option by default. This will allow us to not recreate branches that has been deleted on the upstream and the mirror. --- CHANGELOG | 2 ++ lib/gitlab_projects.rb | 1 + 2 files changed, 3 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 10695fc..e520a99 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,5 @@ +v4.0.3 + - Fetch repositories with `--prune` option by default v4.0.2 - Fix gitlab_custom_hook dependencies 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) -- cgit v1.2.1