datalad_next.repo_utils.has_initialized_annex

datalad_next.repo_utils.has_initialized_annex(path: Path) bool[source]

Return whether there is an initialized annex for path

The given path can be any directory, inside or outside a Git repository. True is returned when the path is found to be within a (locally) initialized git-annex repository.

When this test returns True it can be expected that no subsequent call to an annex command fails with

git-annex: First run: git-annex init

for this path.