tardis.version module¶
- tardis.version.get_git_devstr(sha=False, show_warning=True, path=None)[source]¶
Determines the number of revisions in this repository.
- Parameters
- shabool
If True, the full SHA1 hash will be returned. Otherwise, the total count of commits in the repository will be used as a “revision number”.
- show_warningbool
If True, issue a warning if git returns an error code, otherwise errors pass silently.
- pathstr or None
If a string, specifies the directory to look in to find the git repository. If None, the current working directory is used, and must be the root of the git repository. If given a filename it uses the directory containing that file.
- Returns
- devversionstr
Either a string with the revision number (if sha is False), the SHA1 hash of the current commit (if sha is True), or an empty string if git version info could not be identified.