On Thu, Aug 2, 2018 at 6:47 AM Antonio Ospite <ao2@xxxxxx> wrote: > > When the .gitmodules file is not available in the working tree, try > using HEAD:.gitmodules from the current branch. This covers the case > when the file is part of the repository but for some reason it is not > checked out, for example because of a sparse checkout. > > This makes it possible to use at least the 'git submodule' commands > which *read* the gitmodules configuration file without fully populating > the working tree. The reading part shows how nice our internal config system is, once everything is put in place. > Writing to .gitmodules will still require that the file is checked out, > so check for that before calling config_set_in_gitmodules_file_gently.