datalad_next.repo_utils.get_worktree_head

datalad_next.repo_utils.get_worktree_head(path: Path) tuple[str | None, str | None][source]

Returns the symbolic name of the worktree HEAD at the given path

Returns:

The first item is the symbolic name of the worktree HEAD, or None if there is no commit. The second item is the symbolic name of the "corresponding branch" in an adjusted-mode git-annex repository, or None.

Return type:

tuple