I have a configuration problem with scripting around Git submodule initialization. I need to apply some tuning on the LFS settings within some modules before the actual fetching process starts.
There is the git submodule init command but this does not do the real job, i.e. it does not initialize the actual submodule storage folders. Thus, I cannot set module specific Git options there. (Which is an evil trap BTW, the mount paths are created and you can chdir into them but calling git-config inside modifies the super repo and not the submodule).
OTOH there is the usual git submodule update --init method, but I cannot see any way to run extra code during its operation. I tried adding --no-fetch but this does not make any difference. I also cannot see a --no-checkout or --no-clone option which would just skip the checkout resp. cloning.
What am I overlooking? I cannot imagine that there is no convenient way of hooking into the SM initialization process, or splitting it somehow into two stage (one before fetching and the rest later).