Twig Technology

[...] incredibly interested in all the things you could do with twigs.

No Submodule Mapping Found in .gitmodules for Path Foo

| Comments

Travis CI errored. No submodule mapping …

Today my Travis builds started to error becasue of a submodule that I deleted from my repository a long time ago. Turns out, I probably didn’t do that right.

Travis CI clones only the most recent 50 revisions, which probably has something to do with this. I did the same thing locally, then ran git submodule --init --recursive, and the error message was reproduced. Stack Overflow and Google led me on the right trail, git had some kind of cached information about the folder which I could see when doing git ls-files --stage | grep 160000. To remove it, I had to run git rm --cached foo, then commit and push. Now my builds are green again, and all is well.

My guess is that when I removed the submodule, I removed the folder without the —cached option, and that’s what eventually caused the mistake, delayed only by the window of 50 commits that Travis checks out? Thre are still parts of git that are mysterious to me.

Comments