datalad_next.iter_collections.iter_submodules

datalad_next.iter_collections.iter_submodules(path: Path, *, pathspecs: list[str] | GitPathSpecs | None = None, match_containing: bool = False) Generator[GitTreeItem, None, None][source]

Given a path, report all submodules of a repository worktree underneath

With match_containing set to the default False, this is merely a convenience wrapper around iter_gitworktree() that selectively reports on submodules. With match_containing=True and pathspecs given, the yielded items corresponding to submodules where the given pathsspecs could match content. This includes submodules that are not available locally, because no actual matching of pathspecs to submodule content is performed -- only an evaluation of the submodule item itself.