I've run into an issue with how the cached-copy is maintained.
In a development branch we added a plugin as a git submodule, and that
was deployed to a test server. When we then went to re-deploy the
production branch to that same server, the submodule was still in the
cached copy, which led to it being copied out. As you might expect,
that broke the production version of the app. (This plugin also
depended on a gem being installed under vendor/gems, since was not a
sub-module, it did not appear in the production branch.)
Anyway, long story short, there's an easy fix, which I submit for
inclusion. I would think this is not too dangerous as long as people
aren't depending on untracked files in your cached-copy (and why one
do that, I cannot imagine)
Darrell
---
lib/capistrano/recipes/deploy/scm/git.rb | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/lib/capistrano/recipes/deploy/scm/git.rb b/lib/capistrano/
recipes/deploy/scm/git.rb
index 63e2a28..0e7cef8 100644
--- a/lib/capistrano/recipes/deploy/scm/git.rb
+++ b/lib/capistrano/recipes/deploy/scm/git.rb
@@ -185,6 +185,7 @@ module Capistrano
# since we're in a local branch already, just reset to
specified revision rather than merge
execute << "#{git} fetch #{verbose} #{remote} && #{git}
reset #{verbose} --hard #{revision}"
+ execute << "#{git} clean #{verbose} -d -x -f"
if configuration[:git_enable_submodules]
execute << "#{git} submodule #{verbose} init"
--
1.5.5.1
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---