Creating Drupal 8 core patch from split repo.

Fri, 05/10/2019 - 13:49 -- 5n00py

It's very useful when you working from drupal-composer project.
When you using drupal-composer, core installed from drupal/core split.

For example:

$ git diff
diff --git a/modules/field_layout/src/FieldLayoutBuilder.php b/modules/field_layout/src/FieldLayoutBuilder.php
index fdbefd5e8d..874b87e9f1 100644
--- a/modules/field_layout/src/FieldLayoutBuilder.php
+++ b/modules/field_layout/src/FieldLayoutBuilder.php
....

And there is a problem. Drupal core patches should have /core prefix. So to get proper patch, You can use:

git diff --src-prefix=a/core/ --dst-prefix=b/core/

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Image CAPTCHA
Enter the characters shown in the image.