Git utilities¤
Deprecated utilities.
We have decided to stop exposing Git-related utilities as it's not a core part of the library's functionality. The functions documented on this page will become unavailable in the next major version.
assert_git_repo deprecated ¤
get_latest_tag deprecated ¤
get_repo_root deprecated ¤
tmp_worktree deprecated ¤
Deprecated. Context manager that checks out the given reference in the given repository to a temporary worktree.
This function is deprecated and will become unavailable in the next major version.
Parameters:
-
(repo¤str | Path, default:'.') –Path to the repository (i.e. the directory containing the
.gitdirectory) -
(ref¤str, default:'HEAD') –A Git reference such as a commit, tag or branch.
Yields:
-
Path–The path to the temporary worktree.
Raises:
-
OSError–If
repois not a valid.gitrepository -
RuntimeError–If the
gitexecutable is unavailable, or if it cannot create a worktree