When I wrote down my workflow for #1425 I first tried it on a monorepo clones with --depth 1. However the result of josh-filter [...] --reverse was a branch unconnected to the main branch of the monorepo.
I kind of understand that josh does not have enough information on a shallow clone to create the expected result. However I have a few questions:
- I'd like to understand how josh actually works. Splitting out a workspace from a monorepo does not seem too hard, but connecting a workspace back into the main branch seems like black magic. Could you help me understand how this works?
- Is there a way to detect that the result is not what the user wants and to produce an error instead of a faulty(?) branch?
- Is there a way to fetch just the necessary history to make this work instead of cloning the full repo history?