So, I'd been working out the details of how to fork from a seed repo, but before I could prototype it, I got distracted fixing up the numerous issues I discovered in the current seed repo, such as:
- I somehow had a table in it twice, which I'm pretty sure isn't valid TOML.
- Due to pulling in several iterations of noxfile setup, I had stuff in the noxfile that belonged in the tasks file (basically, if it doesn't need the package installed, it's a candidate for the tasks file).
- Some of my extras defintions were too specialized, and should have been handled in the noxfile by just installing multiple extras.
Here's the plan for how to fork from a seed:
- Get substitutions from ??? (Take a seed.toml file, copy it, optionally adding substitutions, then use the copy to determine the seed repo and substitutions, I guess?)
- Clone the seed to a tmpdir, up to a given patch.
- Recursively process substitutions in the tempdir: rewrite names, and after a file's name has been substituted (with the help of pijul mv), process the files
- (Copy over the seed.toml file?)
- Record the changes
- For thoroughness, perform a green test run.
From the new repo, either clone a fresh repo into the workspace, or attempt a merge with the following special logic:
- Unconditionally test green, even if the diff pattern would normally prohibit it
- If the green test fails, do a red test, I think this needs to still check the diff pattern, I'm not sure.
If things go wrong enough, this might need manual intervention unless I can work out really smart default behavior.
I think I had something else in mind to say, but I lost my train of thought and I have a headache, which is one of many ways circumstances can make me realize it's time to call it. I'll try to actually prototype some of this tomorrow. For now, good night.