Skip to content

Installing a patch that includes changes to non existing files #528

Answered by cweagans
robdekort asked this question in Q&A
Discussion options

You must be logged in to vote

You could potentially use the freeform patcher functionality in 2.x. I'd also be open to a PR that adds a way to pass args to specific patchers. In this case, you'd probably want the --exclude flag for git apply.

Another possibility is to semi-automate this along these lines:

git clone [your repo]
cd [your repo]
git apply --exclude [test paths] [your patch]
git diff > patch-without-test-paths.patch

And then use patch-without-test-paths.patch in your project instead. This is still a manual process, but it could be automated with a script. If you do that, you could potentially run that script on a Composer hook.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@robdekort
Comment options

Answer selected by robdekort
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants