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 ¤
Deprecated. Assert that a directory is a Git repository.
This function is deprecated and will become unavailable in the next major version.
Parameters:
Raises:
-
OSError–When the directory is not a Git repository.
Source code in src/griffe/_internal/git.py
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | |
get_latest_tag deprecated ¤
Deprecated. Get latest tag of a Git repository.
This function is deprecated and will become unavailable in the next major version.
Parameters:
Returns:
-
str–The latest tag.
Source code in src/griffe/_internal/git.py
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | |
get_repo_root deprecated ¤
Deprecated. Get the root of a Git repository.
This function is deprecated and will become unavailable in the next major version.
Parameters:
Returns:
-
Path–The root of the repository.
Source code in src/griffe/_internal/git.py
87 88 89 90 91 92 93 94 95 96 97 98 99 100 | |
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
Source code in src/griffe/_internal/git.py
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | |