From 449bbb4d2de43224417fcc7e8aeb6d7e44cfd31e Mon Sep 17 00:00:00 2001 From: Vincent Lepot Date: Mon, 6 Jul 2015 16:37:30 +0200 Subject: [PATCH] git <1.9 needs fetch tags to be done alone :( --- lib/capistrano/rsync.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/capistrano/rsync.rb b/lib/capistrano/rsync.rb index 7587cec..1470231 100644 --- a/lib/capistrano/rsync.rb +++ b/lib/capistrano/rsync.rb @@ -158,8 +158,11 @@ def has_roles? run_locally do within fetch(:rsync_stage) do - tags = !!fetch(:rsync_checkout_tag, false) ? '--tags' : '' - execute :git, :fetch, '--quiet --all --prune', "#{tags}", "#{git_depth.call}" + execute :git, :fetch, '--quiet --all --prune', "#{git_depth.call}" + + if !!fetch(:rsync_checkout_tag, false) + execute :git, :fetch, '--quiet --tags' + end execute :git, :reset, '--quiet', '--hard', "#{rsync_target.call}"