pkgcheck.addons.git module¶
Git specific support and addon.
- class pkgcheck.addons.git.GitAddedRepo(*args, **kwargs)[source]¶
Bases:
GitChangedRepo
Historical git repo consisting of added packages.
- class pkgcheck.addons.git.GitAddon(*args)[source]¶
Bases:
CachedAddon
Git repo support for various checks.
Pkgcheck can create virtual package repos from a given git repo’s history in order to provide more info for checks relating to stable requests, outdated blockers, or local commits. These virtual repos are cached and updated every run if new commits are detected.
Git repos must have a supported config in order to work properly. Specifically, pkgcheck assumes that the origin branch exists and tracks upstream.
Additionally, the origin/HEAD ref must exist. If it doesn’t, running
git remote set-head origin master
or similar for other branches will create it.You can override the default git remote used for all git comparison using
--git-remote
.- cache = CacheData(type='git', file='git.pickle', version=5)¶
- gitignored(path)[source]¶
Determine if a given path in a repository is matched by .gitignore settings.
- classmethod mangle_argparser(parser)[source]¶
Add extra options and/or groups to the argparser.
This hook is always triggered, even if the checker is not activated (because it runs before the commandline is parsed).
- Parameters:
parser – an C{argparse.ArgumentParser} instance.
- class pkgcheck.addons.git.GitCache(*args, commit)[source]¶
Bases:
DictCache
Dictionary-based cache that encapsulates git commit data.
- class pkgcheck.addons.git.GitChangedRepo(*args, **kwargs)[source]¶
Bases:
SimpleTree
Historical git repo consisting of the latest changed packages.
- class pkgcheck.addons.git.GitCommit(hash: str, commit_time: int, author: str, committer: str, message: tuple, pkgs: ImmutableDict = {})[source]¶
Bases:
object
Git commit objects.
- pkgs: ImmutableDict = {}¶
- class pkgcheck.addons.git.GitConfig[source]¶
Bases:
object
Manages temporary file which holds git config for disabling safe directory feature of git.
- property config_env¶
- class pkgcheck.addons.git.GitLog(cmd, path)[source]¶
Bases:
object
Iterator for decoded git log line output.
- class pkgcheck.addons.git.GitModifiedRepo(*args, **kwargs)[source]¶
Bases:
GitChangedRepo
Historical git repo consisting of the latest modified packages.
- class pkgcheck.addons.git.GitPkgChange(atom: atom, status: str, commit: str, commit_time: int, old: atom = None)[source]¶
Bases:
object
Git package change objects.
- class pkgcheck.addons.git.GitRemovedRepo(*args, **kwargs)[source]¶
Bases:
GitChangedRepo
Historical git repo consisting of removed packages.