Convert messy repos with copied-in files from other repos into a submodulized repo.
- Clone the messy repo, separate from any other instances.
- Create a plugin manifest file.
- Run
submodulize.sh <PATH> - Do all your work on the
submodulizedbranch or a descendent of it
- Run
unsubmodulize.sh <PATH> - Push the
unsubmodulizedbranch upstream
- Fetch the master branch or whatever branch submodulize branched from
- Run
submodulize.sh <PATH>
Plain text at the Moodle root in the file plugin-submodules.manifest. One plugin per line.
relative_path|clone_url|branch [| sparse_paths [| in_repo_tree_path]]
Example (one repo per path): mod/hvp|https://github.com/h5p/moodle-mod_hvp.git|main
Example (monorepo — same URL on two lines, each with sparse paths):
local/kaltura_assign|https://github.com/kaltura/moodle_plugin.git|main|mod/kalvidassign
filter/kaltura|https://github.com/kaltura/moodle_plugin.git|main|filter/kaltura