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 defaultFalse
, this is merely a convenience wrapper arounditer_gitworktree()
that selectively reports on submodules. Withmatch_containing=True
andpathspecs
given, the yielded items corresponding to submodules where the givenpathsspecs
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.