ó
    úÞ j)  ã                  óF   • S r SSKJr  SSKrSSKJr  SS jrS	S jrS
S jrg)zjGit utilities, adopted from mypy's git utilities (https://github.com/python/mypy/blob/master/mypy/git.py).é    )ÚannotationsN)ÚPathc                ó@   • U R                  S5      R                  5       $ )z3Is the given directory version-controlled with git?z.git)ÚjoinpathÚexists©Údirs    ÚQ/var/www/html/gaurav/venv/lib/python3.13/site-packages/pydantic/_internal/_git.pyÚis_git_repor   	   s   € à�<‰<˜Ó×&Ñ&Ó(Ð(ó    c                 ó€   •  [         R                  " SS/5        g! [         R                   a     g[         a     gf = f)zCan we run the git executable?Úgitz--helpTF)Ú
subprocessÚcheck_outputÚCalledProcessErrorÚOSError© r   r
   Úhave_gitr      s@   € ðÜ×Ò ¨Ð 1Ô2ØøÜ×(Ñ(ó ÙÜó Ùðús   ‚ ›=±	=¼=c                ój   • [         R                  " / SQU S9R                  S5      R                  5       $ )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,   € ä×"Ò"Ò#JÐPSÑ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   