Skip to content

Commit

Permalink
Merge pull request moll#10 from vincentlepot/fetch_tags_2_steps
Browse files Browse the repository at this point in the history
git <1.9 needs fetch tags to be done on its own
  • Loading branch information
Bladrak committed Jul 6, 2015
2 parents b985c2f + 449bbb4 commit e527d30
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/capistrano/rsync.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

Expand Down

0 comments on commit e527d30

Please sign in to comment.