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.
Problem/Motivation
Problem:
* Composer workflow with subtree split of project (e.g. drupal core directory)
* Patch workflow e.g. managed by https://github.com/cweagans/composer-patches
* Want to apply a patch from the project that has parts inside and outside the subtree
(If it's only inside the subtree we cann still use patch -p2.)
Proposed resolution
In an ideal world we could tell git-apply or patch to just use the subtree. It looks like there is no such option.
Autogererate subtree splits of patches in some way.
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#4 | core-2606840-4-Core-subtree-of-Issue-1269780-symlinksifownermatch.patch | 4.42 KB | geek-merlin |
Comments
Comment #2
geek-merlinComment #3
geek-merlinTo elaborate on an important patch that spans cure subtree and root htaccess: #1269780-99: Remove symlinks option from .htaccess
(I attach the subtree split of it just that it has a home.)
Comment #4
geek-merlinComment #5
geek-merlinHere's a sed recipe to massage a patch before applying. Implementing something like this looks like the way to go.
http://stackoverflow.com/a/19328727/606859
Comment #6
geek-merlinNote: there seems to be diff parse code in core.
Comment #7
cweagansI'd be happy to add this functionality to cweagans/composer-patches if you happen to find a good way to do it. Not sure why this issue is open in the d.o infrastructure queue though.
Comment #8
mlhess CreditAttribution: mlhess commentedThis does not seem to be an infra issue.