Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#4 | drush-remove-git-directories-1875510-04.patch | 2.18 KB | jhedstrom |
Comments
Comment #1
David Stosik CreditAttribution: David Stosik commentedBig 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
Comment #2
David Stosik CreditAttribution: David Stosik commentedComment #3
jhedstromMarked #1854514: GIT based libraries forced as working-copy as a duplicate.
Comment #4
jhedstromThis patch seems to do the job.
Comment #5
Deciphered CreditAttribution: Deciphered commentedThis issue caused my Distro (DrupalAPI) to gain about 100MB, so glad to see some movement.
Comment #6
jhedstromCommitted to 5 and 6.