1
0
Fork 0
mirror of https://github.com/capistrano/capistrano synced 2023-03-27 23:21:18 -04:00

Merge pull request #1585 from spiceworks/master

Prune old tracking branches from the git repository on each host
This commit is contained in:
Matt Brictson 2016-02-23 09:13:20 -08:00
commit 8f9f0f02dd
3 changed files with 4 additions and 2 deletions

View file

@ -18,6 +18,8 @@ https://github.com/capistrano/capistrano/compare/v3.4.0...HEAD
* Drop support for Ruby 1.9.3 (Capistrano may still work with 1.9.3, but it is
no longer officially supported)
* Added new runtime option `--print-config-variables` that inspect all defined config variables in order to assist development of new capistrano tasks (@gerardo-navarro)
* Prune dead tracking branches from git repositories while updating
* Git version 1.6.3 or greater is now required
* Minor changes
* Fix filtering behaviour when using literal hostnames in on() block (@townsen)

View file

@ -34,7 +34,7 @@ class Capistrano::Git < Capistrano::SCM
if (depth = fetch(:git_shallow_clone))
git :fetch, '--depth', depth, 'origin', fetch(:branch)
else
git :remote, :update
git :remote, :update, '--prune'
end
end

View file

@ -61,7 +61,7 @@ module Capistrano
describe "#update" do
it "should run git update" do
context.expects(:fetch).with(:git_shallow_clone).returns(nil)
context.expects(:execute).with(:git, :remote, :update)
context.expects(:execute).with(:git, :remote, :update, '--prune')
subject.update
end