We have a job that automatically cuts the train branch each week.
The script that starts this process is: https://gitlab.wikimedia.org/repos/releng/release/-/blob/main/make-release/automatic-branch-cut
What it does:
- For all branched extensions, skins, and core it makes a new branch named wmf/<version>
- It checks out mediawiki/core
- git branch -B wmf/<version>
- Removes existing submodules (git submodule deinit && git rm)
- Modifies extensions/.gitignore to remove the * line
- Does git submodule add --branch <wmf/<version> for all branched extensions/skins
- Removes vendor from .gitignore
- Updates the version in includes/Defines.php
- Pushes this as a new change to the branch (example)
There's a problem here.
If the HEAD of mediawiki/core changes between when the branch is created and when it's cloned, this process will fail with Implicit merge (see T373425)