News for hackers. Stuff that matters.
Re:Monorepoize – Bash scripts for creating a monorepo out of... by pierrebai on Monday April 27, 2020 @10:21AM (#22996062)
git has submodules.

A repo can thus host any number of sub-repos. Using modules can also be pretty much like having a monorepo if you have a master repo with all others under it. This way, you can still publish things like public API as a repo.

Re:Monorepoize – Bash scripts for creating a monorepo out of... by mceachen on Monday April 27, 2020 @10:52AM (#22996388)
Submodules don't allow for atomic commits that span repos, though. Atomic cross-project commits are the most compelling selling feature for monorepos IMHO.

(A common case for this is changing a function's API, and fixing all downstream consumers, in one tidy, holistic PR).

Re:Monorepoize – Bash scripts for creating a monorepo out of... by JoshTriplett on Monday April 27, 2020 @01:44PM (#22998062)
> Submodules don't allow for atomic commits that span repos, though.

They can, but there's little tooling support to help you do so.

You can make a new commit in one repo, and then in one atomic commit, you can pull that new commit into a parent repo's submodule and fix the users calling into that submodule.

Re:Monorepoize – Bash scripts for creating a monorepo out of... by mumblemumble on Monday April 27, 2020 @10:52AM (#22996384)
They don't work quite the same way as svn externals, though, in a way that didn't work for us. In particular, they leave no good way to deal with merging in upstream changes in a submodule's code if you've also made some of your own (provisional) edits.