ML iDdZddlmZddlZddlZddZd dZd dZddZy) zGit utilities.) annotationsNc|tjjtjj|dS)z3Is the given directory version-controlled with git?z.git)ospathexistsjoindirs N/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/mypy/git.py is_git_repor s$ 77>>"'',,sF3 44cz tjddgy#tj$rYyt$rYywxYw)zCan we run the git executable?gitz--helpTF) subprocess check_outputCalledProcessErrorOSErrorr r have_gitrs@ 12  ( ( s:::cPtjgd|jS)z.Get the SHA-1 of the HEAD of a git repository.)rz rev-parseHEADcwdrrstripr s r git_revisionrs  " "#?S I O O QQr cZtjgd|}|jdk7S)z7Check whether a git repository has uncommitted changes.)rstatusz-unoz --porcelainrr r)r outputs r is_dirtyr s'  $ $%MSV WF <<>S  r )r strreturnbool)r"r#)r r!r"bytes) __doc__ __future__rrrr rrr rr r r's(# 5 R !r