bundles / IPython 9.11.0 / IPython / utils / sysinfo / pkg_commit_hash
function
IPython.utils.sysinfo:pkg_commit_hash
source: /IPython/utils/sysinfo.py :32
Signature
def pkg_commit_hash ( pkg_path : str ) → tuple[str, str] Summary
Get short form of commit hash given directory pkg_path
Extended Summary
We get the commit hash from (in order of preference):
IPython.utils._sysinfo.commit
git output, if we are in a git repository
If these fail, we return a not-found placeholder tuple
Parameters
pkg_path: strdirectory containing package only used for getting commit from active repo
Returns
hash_from: strWhere we got the hash from - description
hash_str: strshort form of hash
Aliases
-
IPython.utils.sysinfo.pkg_commit_hash