code: def _shallow_clone(self, ref, git_cmd):  # pragma: windows no cover
          
  
          git_config = 'protocol.version=2'
          git_cmd('-c', git_config, 'fetch', 'origin', ref, '--depth=1')
          git_cmd('checkout', ref)
          git_cmd(
              '-c', git_config, 'submodule', 'update', '--init',
              '--recursive', '--depth=1',
          )
docs: Perform a shallow clone of a repository and its submodules