:py:mod:`mass_driver.git` ========================= .. py:module:: mass_driver.git .. autodoc2-docstring:: mass_driver.git :parser: myst :allowtitles: Module Contents --------------- Functions ~~~~~~~~~ .. list-table:: :class: autosummary longtable :align: left * - :py:obj:`clone_if_remote ` - .. autodoc2-docstring:: mass_driver.git.clone_if_remote :parser: myst :summary: * - :py:obj:`get_cache_folder ` - .. autodoc2-docstring:: mass_driver.git.get_cache_folder :parser: myst :summary: * - :py:obj:`commit ` - .. autodoc2-docstring:: mass_driver.git.commit :parser: myst :summary: * - :py:obj:`push ` - .. autodoc2-docstring:: mass_driver.git.push :parser: myst :summary: * - :py:obj:`switch_branch_then_pull ` - .. autodoc2-docstring:: mass_driver.git.switch_branch_then_pull :parser: myst :summary: * - :py:obj:`get_default_branch ` - .. autodoc2-docstring:: mass_driver.git.get_default_branch :parser: myst :summary: Data ~~~~ .. list-table:: :class: autosummary longtable :align: left * - :py:obj:`DEFAULT_CACHE ` - .. autodoc2-docstring:: mass_driver.git.DEFAULT_CACHE :parser: myst :summary: API ~~~ .. py:data:: DEFAULT_CACHE :canonical: mass_driver.git.DEFAULT_CACHE :value: 'Path(...)' .. autodoc2-docstring:: mass_driver.git.DEFAULT_CACHE :parser: myst .. py:function:: clone_if_remote(repo_path: str, cache_folder: pathlib.Path, logger: logging.Logger) -> git.Repo :canonical: mass_driver.git.clone_if_remote .. autodoc2-docstring:: mass_driver.git.clone_if_remote :parser: myst .. py:function:: get_cache_folder(cache: bool, logger: logging.Logger) -> pathlib.Path :canonical: mass_driver.git.get_cache_folder .. autodoc2-docstring:: mass_driver.git.get_cache_folder :parser: myst .. py:function:: commit(repo: git.Repo, migration: mass_driver.models.migration.MigrationLoaded) :canonical: mass_driver.git.commit .. autodoc2-docstring:: mass_driver.git.commit :parser: myst .. py:function:: push(repo: git.Repo, branch_name: str) :canonical: mass_driver.git.push .. autodoc2-docstring:: mass_driver.git.push :parser: myst .. py:function:: switch_branch_then_pull(repo: git.Repo, pull: bool, branch_name: str | None = None) :canonical: mass_driver.git.switch_branch_then_pull .. autodoc2-docstring:: mass_driver.git.switch_branch_then_pull :parser: myst .. py:function:: get_default_branch(r: git.Repo) -> str :canonical: mass_driver.git.get_default_branch .. autodoc2-docstring:: mass_driver.git.get_default_branch :parser: myst