Support both submodules and non-connected repositories