
    ,h)                    @    d Z ddlmZ ddlZddlmZ ddZd	dZd
dZy)zjGit utilities, adopted from mypy's git utilities (https://github.com/python/mypy/blob/master/mypy/git.py).    )annotationsN)Pathc                @    | j                  d      j                         S )z3Is the given directory version-controlled with git?z.git)joinpathexistsdirs    Y/var/www/html/Resume-Scraper/venv/lib/python3.12/site-packages/pydantic/_internal/_git.pyis_git_repor   	   s    <<&&((    c                 z    	 t        j                  ddg       y# t         j                  $ r Y yt        $ r Y yw xY w)zCan we run the git executable?gitz--helpTF)
subprocesscheck_outputCalledProcessErrorOSError r   r
   have_gitr      s@     12((  s    :::c                n    t        j                  g d|       j                  d      j                         S )z.Get the SHA-1 of the HEAD of a git repository.)r   z	rev-parsez--shortHEAD)cwdzutf-8)r   r   decodestripr   s    r
   git_revisionr      s,    ""#JPST[[\cdjjllr   )r	   r   returnbool)r   r   )r	   r   r   str)	__doc__
__future__r   r   pathlibr   r   r   r   r   r   r
   <module>r!      s!    p "  )
mr   