On Tue, 30 Mar 2021 at 17:00, Warner Losh <i...@bsdimp.com> wrote:
> submodules have caused me significant pain in rebasing the bsd-user work.
> The way QEMU does things, you wind up with unclean trees after a build,
> which causes grief at times... I for one, would shed no tears at the number of
> submodules dropping to 0.

I agree that submodules are bad, but in general you shouldn't have
an unclean tree after build as a result of them. (The exception I'm
aware of is if you have to 'git checkout' an older revision where a
submodule that exists now didn't exist back then; git leaves the
submodule directory in the source tree and you have to rm it manually.
But that's "after checkout", not "after build".)

The main bear-trap IMHO is that you have to remember to
"git submodule update" when checking out different revs of
trunk to keep the submodules at the right version. I wish
git just automatically kept submodules at the right rev for
whatever trunk rev you're currently on.

-- PMM

Reply via email to