I'm making a git extension. It's in its own git repo. To run tests, I have created several test repos which are used by my project. Currently they are submodules of the main repo.
I am dissatisfied with this. Firstly they themselves need to be cloned (in case the original cloner didn't use --recursive
) as part of the test setup, but, more importantly, the project is not self-contained. One can't just migrate the project to another server without taking care of the helper submodules. Even if you have cloned the original repo, you need to make sure you have access to the helpers.
So, since I need a test setup anyway, I was considering instead of using submodules to build the test repos to their desired state from scratch with helper scripts.
Then I figured that it will probably be more efficient to create the bare test repos myself once, add them as a tarball in the original, and unpack it as part or the test setup.
Then I wondered... is there an even easier way to do this? Can I safely add entire git repos inside of another instead of using submodules? Then there won't even be a need for a test setup.