mass_driver.git
Manipulating git repos natively, without much knowledge of mass-driver models
Module Contents
Functions
Build a GitRepo; If repo_path isn’t a directory, clone it |
|
Create a cache folder, either locally or in temp |
|
Commit the repo’s changes in branch_name, given the PatchDriver that did it |
|
Push a branch of the repo to a remote |
|
Switch branch then pull |
|
Get the default branch of a repository |
Data
API
- mass_driver.git.DEFAULT_CACHE = None
- mass_driver.git.clone_if_remote(repo_path: str, cache_folder: pathlib.Path, logger: logging.Logger) git.Repo [source]
Build a GitRepo; If repo_path isn’t a directory, clone it
- mass_driver.git.get_cache_folder(cache: bool, logger: logging.Logger) pathlib.Path [source]
Create a cache folder, either locally or in temp
- mass_driver.git.commit(repo: git.Repo, migration: mass_driver.models.migration.MigrationLoaded)[source]
Commit the repo’s changes in branch_name, given the PatchDriver that did it
- mass_driver.git.push(repo: git.Repo, branch_name: str)[source]
Push a branch of the repo to a remote