This issue #627012: Improve description for --working-copy introduced cleaning up of .git files (and other protocols) after fetching the component.
In the case of git, it removes it after clone, and then again after checking out a branch.. unfortunately you cannot checkout the branch if you've already removed the .git db files or else you'll get a 'Fatal: not a git repository' error:
Executing: git clone 'git://git.mig5.net/drupal/profiles/feature_server' '/tmp/drush_make_tmp_1261011208'/'feature_server' ..
Initialized empty Git repository in /tmp/drush_make_tmp_1261011208/feature_server/.git/..
Executing: rm -rf '/tmp/drush_make_tmp_1261011208'/'feature_server'/.git ...
feature_server cloned from git://git.mig5.net/drupal/profiles/feature_server. ...
Executing: git checkout -b 'community_featureservers_org' origin/'community_featureservers_org'
fatal: Not a git repository
Unable to check out branch community_featureservers_org.
We should only remove the .git files after everything has finished (i.e only after the clone *and* a potential branch has been checked out).
Patch attached. Not sure if other protocols are affected in the same way (looked at Hg, didn't see any branch action)
Comment | File | Size | Author |
---|---|---|---|
drush_make_delete_git_after_branch.patch | 1.58 KB | mig5 |
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedoops.
Comment #2
dmitrig01 CreditAttribution: dmitrig01 commentedGood catch