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.
This patch allows one to specify a subtree from a git repository, in case a module/theme/profile is stored in a subdirectory.
With SVN this is always possible since a subdirectory can be specified inside the repository URL. This patch brings the same functionality to Git checkouts.
Comment | File | Size | Author |
---|---|---|---|
#13 | 0001-Issue-1074748-by-arnebrasseur-get-only-a-subtree-wit.patch | 1.12 KB | ao2 |
#8 | gitSubfolderWithRecursion-1074748-8.patch | 1.61 KB | MichaelCole |
#1 | 1074748-git-subtree-checkout.patch | 1.17 KB | arnebrasseur |
Comments
Comment #1
arnebrasseur CreditAttribution: arnebrasseur commentedComment #2
patcon CreditAttribution: patcon commentedI would just like to point out a potential alternative use for this.
Lots of themes have starter subthemes. Right now, creating a theme from that involves copying the files out and losing commit history. It would be great if we could clone the theme repo, create a branch for a custom theme, and make the namespacing changes to the starter subtheme. That way, we can easily pull in updated from the master branch. If drushmake allowed for subtree git cloning, then we could work like this, and keep our development more cohesive.
Haven't actually tried this yet, but I think it should work. Correct me if I'm wrong. :)
Comment #3
patcon CreditAttribution: patcon commentedOh hey, might want to check this out:
#919224-15: Allow use of subtrees or individual file from archives instead of the whole archive
Comment #4
patcon CreditAttribution: patcon commentedJust gave it a spin on v2.2 of drush_make, and it works A-OK for my use-case!
thanks arnebrasseur! In the future, setting the status to "Needs Review" once you submit a patch will help it get noticed by the folks with commit access :)
Comment #5
mrhanlon CreditAttribution: mrhanlon commentedJust what I needed. Worked perfectly, thanks.
+1
Comment #6
MichaelCole CreditAttribution: MichaelCole commentedAlso note: http://stackoverflow.com/questions/2336580/sparse-checkout-in-git-1-7-0
Comment #7
MichaelCole CreditAttribution: MichaelCole commentedPatch works great!
Comment #8
MichaelCole CreditAttribution: MichaelCole commentedMy bad. After more testing, original patch works great :-) Ignore this broken patch.
Comment #9
MichaelCole CreditAttribution: MichaelCole commentedComment #10
MichaelCole CreditAttribution: MichaelCole commentedFWIW, this patch works on 2.2. Haven't tried it on 3.x.
Comment #12
patcon CreditAttribution: patcon commentedTo clarify, the approach above that I mentioned does work, and goes like this:
git mv starterkits/omega-html5 starterkits/mytheme
Should make it simpler to keep custome starter themes updated :)
Comment #13
ao2 CreditAttribution: ao2 commented@arnebrasseur: I tried to change the style and naming to match the one used in #919224: Allow use of subtrees or individual file from archives instead of the whole archive; see the attached patch, is this OK to you?
I am taking this patch in the set for that issue, and I'll try to get it merged along with the others about
$download['subtree']
(preserving your authorship of course).Regards,
Antonio
Comment #14
anarcat CreditAttribution: anarcat commentedseems to me this is a new patch that needs testing! setting status accordingly.
Comment #15
helmo CreditAttribution: helmo commented[ Powered by #1115636: Issue Macros and Templates - Drush Make]
Drush make is being merged into drush core (discussed in issue:#1310130: Put drush make in drush core)
This means that the issue queue is also moving. The drush queue has a component 'Make' especially for drush_make.
More information will be posted on the drush_make and drush project pages.
Comment #16
Cyclodex CreditAttribution: Cyclodex commentedIs this still not implemented in drush ? I am a bit confused about this topic over here, looks like this is separated drush for drupal.org ?
#1482888: Support 'subtree' download attribute for libraries
Comment #17
greg.1.anderson CreditAttribution: greg.1.anderson commentedThis issue was marked
closed (won't fix)
because Drush has moved to Github.If this feature is still desired, you may copy it to our Github project. For best results, create a Pull Request that has been updated for the master branch. Post a link here to the PR, and please also change the status of this issue to
closed (duplicate)
.Please ask support questions on Drupal Answers.
Comment #18
drzraf CreditAttribution: drzraf commentedOpened https://github.com/drush-ops/drush/issues/2465