drupal-project icon indicating copy to clipboard operation
drupal-project copied to clipboard

A Git alias that makes core Drupal development easy with this project

Open joelpittet opened this issue 6 years ago • 5 comments

Drush is requiring composer to do module installation and so I thought it would be nice with this but not sure how to get core's git repos to download because of what I think is the subtree split?

joelpittet avatar Mar 04 '18 00:03 joelpittet

I have the following alias in my .gitconfig. I use it from time to time to roll a quick core patch. It works as long the files are in the core folder.

[alias]
        core-patch = diff --src-prefix=a/core/ --dst-prefix=b/core/ -M

webflo avatar Mar 04 '18 08:03 webflo

Fetch git repo with composer: composer require --prefer-source drupal/core:8.5.x-dev

webflo avatar Mar 04 '18 08:03 webflo

Thanks @webflo, sorry for the silly questions but how in sync is the composer package version with d.o?

The thing I was trying to do last night was test out an old bug with the latest Drupal with a the latest stable release of a contrib module(pathauto). I was hoping to use my d.o git clone of 8.6.x and just drush -y en pathauto like I've done in the past, that didn't work because of drush changes. So I thought next bright idea since it asks for composer and I use this project is maybe I could configure my workflow with this. It would be way better for the contrib module dev, but for core dev it may not be the best, so I thought I'd ask.

My end result was in the core webroot I just composer'd down the contrib module, it touched my composer.json and composer.lock file but I just reverted those after for this task.

joelpittet avatar Mar 04 '18 16:03 joelpittet

The subtree split is fairly up to date. You can run a git pull in the core folder after the initial install. It should work as long core did not update or add a new dependency.

webflo avatar Mar 07 '18 06:03 webflo

How about we document core-patch by specifying it as a composer script?

weitzman avatar May 25 '18 14:05 weitzman