cape.dkit.gitutils: Very simple git utils for DataKits¶
This module provides one or more functions that provide information about or execute actions in a git repository.
Commands can be executed on a remote host using SSH commands without any third-party dependencies.
- cape.dkit.gitutils.get_gitdir(path=None, host=None, **kw)¶
Low-level interface to get working repo from
gitIf a bare repo, this will return the GITDIR, which is a folder ending with
.git. Otherwise it will return the “working directory”, which contains the.git/folder.- Call:
>>> fgit = repo.get_gitdir(path, host=None, **kw)
- Inputs:
- Outputs:
- fgit:
None|str Absolute path to top-level git directory
- fgit:
- Versions:
2021-07-19
@ddalle: Version 1.0