Closed woopla closed 2 years ago
This PR got closed automatically as I pushed a rewrite to master with unrelated history.
I've added a few features to make
tomono.sh
more flexible:1. Ability to select the default branch name
This is obsolete in the rewrite
2. Support for commented-out lines in the input file
Interesting, not sure if I'm super fussed about this since running a to-monorepo migration is not something I envisage people doing on the reg. The script is already quite hairy, I'm very keen to keep it as simple as possible. I'm inclined to think removing comments from stdin is something people can do themselves, if they really need it.
3. Ability to use one of the repositories as the top-level (so it's path will not change once imported)
This is really nice, but unfortunately not compatible with the new rewrite. And I don't know how I'd make that work with read-tree :/ I struggled for a bit but I'm not good enough with git to tackle this. I'll definitely keep it in mind though, if I ever come up with a solution I'll make sure to revisit!
While I was editing the files I fixed a few whitespace and Shellcheck issues. It's still reporting a couple but I did not want to make more invasive changes :)
Thanks, good instincts ;) it would've been obsolete.
For posterity's sake, the old PR diff is here: https://github.com/hraban/tomono/compare/v1...woopla:more-flexibility
3. Ability to use one of the repositories as the top-level (so it's path will not change once imported)
This is really nice, but unfortunately not compatible with the new rewrite. And I don't know how I'd make that work with read-tree :/ I struggled for a bit but I'm not good enough with git to tackle this. I'll definitely keep it in mind though, if I ever come up with a solution I'll make sure to revisit!
I found a way to do this! Ironically, that made me wonder: why not use that existing repo as the monorepo, and use --continue
on that? Since it is, by default, already the top level repo then. Wouldn't that be a more elegant solution?
Yes that would be more elegant indeed! I went for "the shortest path to getting this working" rather than the "best long-term idea" on this one I'm afraid :p
I can relate :) Thanks again for your contributions, I'll leave it at that then. All the best!
I've added a few features to make
tomono.sh
more flexible:While I was editing the files I fixed a few whitespace and Shellcheck issues. It's still reporting a couple but I did not want to make more invasive changes :)