capistrano/capistrano — Issue #149: Submodules with Git 1.7.8 do not work with "set :deploy_via, :copy"
Author: remino
Created: 2012-01-31 08:14:25+00:00
State: open

Hi,

Since Git 1.7.8, any project with submodules initialised with or after that version will not get properly deployed with "set :deploy_via, :copy". I am using Capistrano 2.9.0.

To reproduce:

* Add ````set :deploy_via, :copy```` in ````config/deploy.rb````.
* Add a module: ````git submodule add git://hostname/path/to/repo.git path/to/submodule````
* Commit the changes: ````git add .; git commit -m 'Add submodule'````
* Deploy: ````cap deploy````
* Log on server: ````ssh username@server````
* Change into the directory of the project: ````cd /path/to/the/deployed/project````
* Check the status of the repo: ````git status````

An error message similar to the following should appear:

fatal: Not a git repository: /absolute/path/to/submodule/on/machine/from/which/it/was/deployed

If you deploy from a Mac, the path above should start with ````/private/var/folder````.