capistrano/capistrano — pull request #473 by kamermans (2013-05-13 21:13:14+00:00)
Title: Fixes a bug that deletes the staging directory before deployment when specifying ".*" in :copy_exclude

When using the following config:

set :deploy_via, :copy
set :copy_exclude, [".*"]

The temp directory used for staging a copy is itself deleted ("."), so the deploy fails. This commit sanitizes the ".*" by removing "." and ".." from the list of deleted folders. Using ".*" is helpful in excludes since it allows you to exclude all locally hidden files using that syntax. This also brings the exclusion syntax inline with the .gitignore syntax.