operations.git
Provides operations related to git.
Functions
def git.repo()
git.repo()
Clones or updates a git repository and its submodules.
Parameters
url: The url to the git repository.
path: The path where the repository should be cloned.
branch_or_tag: Either a branch name or a tag to clone. Follows the default branch of the remote if not given.
update: Whether to keep the repository up to date if it has already been cloned.
depth: Keep the repository as a shallow clone with the specified number of commits. Also applies when pulling updates.
rebase: Use
--rebase
when pulling updates.ff_only: Use
--ff-only
when pulling updates.update_submodules: Also initialize and update submodules after cloning or pulling.
recursive_submodules: Recursively update submodules after cloning or pulling.
shallow_submodules: Also apply the given
depth
to submodule updates.name: The name for the operation.
check: If True, returning
op.failure()
will raise an OperationError. All manually raised OperationErrors will be propagated. When False, any manually raised OperationError will be caught andop.failure()
will be returned with the given message while continuing execution.op: The operation wrapper. Must not be supplied by the user.
Last updated