fL i)@dZddlmZddlZddlmZddZd dZd dZy) zjGit utilities, adopted from mypy's git utilities (https://github.com/python/mypy/blob/master/mypy/git.py).) annotationsN)Pathc@|jdjS)z3Is the given directory version-controlled with git?z.git)joinpathexistsdirs ]/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/pydantic/_internal/_git.py is_git_repor s <<  & & ((cz tjddgy#tj$rYyt$rYywxYw)zCan we run the git executable?gitz--helpTF) subprocess check_outputCalledProcessErrorOSErrorr r have_gitrs@ 12  ( ( s:::cntjgd|jdjS)z.Get the SHA-1 of the HEAD of a git repository.)rz rev-parsez--shortHEAD)cwdzutf-8)rrdecodestriprs r git_revisionrs,  " "#JPS T [ [\c d j j llr )r rreturnbool)rr)r rrstr) __doc__ __future__rrpathlibrr rrrr r r!s!p") mr