Specifying the following in the make file

libraries[leaflet][type] = "libraries"
libraries[leaflet][download][type] = "git"
libraries[leaflet][download][url] = "git://github.com/CloudMade/Leaflet.git"
libraries[leaflet][download][tag] = "v0.4.5"

does and without using the --working-copy option does not remove the .git repository after "drush make". It does so correctly for modules, but not for libraries.

Confirmed that drush 5.7 does this correct though, and it seems the change from

if (!$wc && file_exists($tmp_location . '/.git')) {
  drush_delete_dir($tmp_location . '/.git', TRUE);
}

to

 
if (!$wc && file_exists($download_location . '/.git')) {
    drush_register_file_for_deletion($download_location . '/.git');
}

is responsible.

Files: 

Comments

David Stosik’s picture

Title:Drush make 5.8 does not remove .git directories for libraries» Drush make 5.8 does not remove .git directories for core and libraries
Priority:Normal» Major

Big issue!
The core's .git directory is not removed either.
This broke my working copy as it removed my project's .git folder to replace it by Pressflow's one (which I download through Git to get a specific version). Which means that all my commited-but-not-pushed work has been lost!
This needs to get fixed as other people could lose work on the way.

Thank you,
David

David Stosik’s picture

Title:Drush make 5.8 does not remove .git directories for core and libraries» Drush Make does not remove .git directories for core and libraries
Version:7.x-5.8» 7.x-5.x-dev
jhedstrom’s picture

jhedstrom’s picture

Status:Active» Needs review
StatusFileSize
new2.18 KB

This patch seems to do the job.

Deciphered’s picture

This issue caused my Distro (DrupalAPI) to gain about 100MB, so glad to see some movement.

jhedstrom’s picture

Status:Needs review» Fixed

Committed to 5 and 6.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.