Thursday, May 14, 2020
The shaving of yaks
A day ago,
a month ago
(time no longer has real meaning anymore),
I was ask to look into moving our code away from SVN and into
Ever since I've been pretty much busy with the shaving of yaks—lots and lots of yaks.
And it's more than just converting a repository of code from SVN to
git—it's also breaking up what is basically
a monorepos into lots of separate repos for reasons
(operations hates having to checkout the 800 pound gorilla for the 4 oz. banana).
And without losing history if at all possible.
Lots of yaks to shave in this project.
So I've been learning about submodules in
git and while I like
I'm not a fan of the submodule.
when you clone a repository with submodules
git clone https://git.example.com/foo.git)
you don't get the submodules.
That's another two steps to get them
git submodule init; git submodule update).
I solved that issue with a new
getmod: git submodule init git submodule update
And on the build system, I made sure that
make getmod was done prior to
That issue solved.
Another issue—we use Lua in our department, but we ended up with using two different versions. The stuff I built is still using 5.1.5, while a new project a fellow cow-orker wrote used 5.3.2. This is a chance to consolidate some dependencies, and to that end, I have a new single Lua repo with every version of Lua from 5.1.4 to 5.3.5 (with all the patches applied). But as I found out (and many yaks were shaved to bring me this information) you can't just checkout a particular tag or branch for a submodule.
So I solved that issue in the
Makefile as well:
VLUA := $(shell cd deps/lua ; git describe --tag) ifneq ($(VLUA),"5.1.5.p2") DUMMY := $(shell cd deps/lua; git checkout 5.1.5.p2) endif
This checks to see which version of Lua is checked out,
and if it's not the one I want,
check out the version I do want.
I also had to make sure the
.gitmodule file had
ignore = all set:
[submodule "deps/lua"] path = deps/lua url = https://git.example.com/lua.git ignore = all
git status from freaking people out.
I figure this will keep me busy for the next few months at least. Or maybe days. Time just flows strangely these days.