In git-2.eclass EGIT_HAS_SUBMODULES requires a nonbare clone. I'll attach a patch to support submodules in bare clones. Another bug: When a force-update is required, in a nonbare clone git will attempt to merge the commits. This is not a good idea. Reproducible: Always
Created attachment 337628 [details, diff] Support for submodules in bare repositories Tested with bare repositories and works. Not tested with nonbare repositories.
That's a lot of code with no comments. I'd appreciate if you could elaborate on it a bit more. Especially, how does it work with network activity? Is it possible to use the repo with submodules with EVCS_OFFLINE=1 and no network access? I was going to work on something like this for a long time but never got the time to do it. However, my solution was more like hand-fetching all the submodules into separate bare clones. Also, I see you're using --git-dir a lot there. If it's everywhere, could you instead use 'local GIT_DIR=...' in the src_unpack() func, plus 'export GIT_DIR'?
Use git-r3.eclass instead