2 ms·
If v8 was available as a git repository, node could have gone the submodules route which works perfectly and is solving the exact problem the parent article is
by pilif 16y ago
If v8 was available as a git repository, node could have gone the submodules route which works perfectly and is solving the exact problem the parent article is talking about.
To stay with node/v8, you would add v8 as a submodule and check out a specific revision or tag. The parent repository (node) would keep track of that revision and whenever you clone the parent, you'd be able to fetch the submodule and check out the correct revision.
If you want to update v8, you cd into the v8 dep directory and check out the newer tag. The parent repository will see this and offer you to commit that change to the submodule as a commit of the main repository.
We're using this facility internally with some projects, sometimes adding internally developped modules as submodules, sometimes adding public libraries.
Public libraries as submodules is really cool as you can use git's awesome merging features to keep around modifications you made to said libraries even if you update the target library.
I'm having a bit of difficulty at explaining the concept, but once you do it, it's simple and beautiful.
- deleted 16y ago[deleted]