Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Capability to split many-to-many mono-folders-to-branches #54

Open
crossan007 opened this issue Mar 6, 2020 · 0 comments
Open

Capability to split many-to-many mono-folders-to-branches #54

crossan007 opened this issue Mar 6, 2020 · 0 comments

Comments

@crossan007
Copy link

I've got a monorepo with hundreds of standalone project-root folders which I'm converting to an equal number of individual branches (each branch representing the root of each standalone project currently in the monorepo)

Currently, my "best approach" is running subtree split in parallel: specifying each folder in the root of the monorepo and the corresponding branch name. e.g.:

for d in *; do
    # Will print */ if no directories are available
    #echo $d
    git subtree split -P "$d" -b "$d" &
done

The issue with this approach is that it pegs the CPU for approximately 8 hours and is woefully inefficient.

I would like to be able to run one instance of subtree split in a manner that is capable of multiple target branches for each commit it parses (dependent on the paths affected by each commit): rather than multiple instances of subtree split each focusing on it's own path pattern.

One possible idea would be to allow RegEx parsing of the pattern with capture groups; and allow use of the RegEx capture group value within the target branch name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant