This causes the index to be read into memory which may cause some slowness for larger repositories if done on the UI thread.

Another approach would be to guess if the repository has submodules without reading the index by checking if a .gitmodules file exists at the root of the working directory or if the repository's config contains any submodule entries.

Do you want to try that approach?  Or I could push a new change doing that, let me know