Skip to content

utils.git

Warning

These are internal functions that you probably don't want to interact with directly.

Functions implementing the automatic cloning of the Anthology repository.

clone_or_pull_from_repo

clone_or_pull_from_repo(repo_url, local_path, verbose)

Clones a Git repository, or pulls from remote if it already exists.

Parameters:

Name Type Description Default
repo_url str

The URL of a Git repo.

required
local_path StrPath

The local path containing the repo. If {local_path}/.git exists, we assume it already contains the repo and will attempt to pull from 'origin'; otherwise, we will attempt to clone the repo into local_path.

required
verbose Optional[bool]

If True, will show a progress display.

required