Ë
    ùmxi@	  ã                   ó–   — d Z ddgZddlmZmZ ddlmZmZ ddlm	Z	 ddl
mZmZ ddlmZ dd	lmZ dd
lmZ erddlmZ  G d„ de«      Zy)zCModule with our own gitdb implementation - it uses the git command.ÚGitCmdObjectDBÚGitDBé    )ÚOInfoÚOStream)r   ÚLooseObjectDB)Ú	BadObject)Ú
bin_to_hexÚ
hex_to_bin)ÚGitCommandError)ÚTYPE_CHECKING)ÚPathLike)ÚGitc                   ó`   ‡ — e Zd ZdZdeddddfˆ fd„Zdedefd	„Zdede	fd
„Z
dedefd„Zˆ xZS )r   z¾A database representing the default git object store, which includes loose
    objects, pack files and an alternates file.

    It will create objects only in the loose object database.
    Ú	root_pathÚgitr   ÚreturnNc                 ó2   •— t         ‰| �  |«       || _        y)z9Initialize this instance with the root and a git command.N)ÚsuperÚ__init__Ú_git)Úselfr   r   Ú	__class__s      €ú=/home/htdocs/ttos/venv/lib/python3.12/site-packages/git/db.pyr   zGitCmdObjectDB.__init__"   s   ø€ ä‰Ñ˜Ô#Øˆ�	ó    Úbinshac                 ó~   — | j                   j                  t        |«      «      \  }}}t        t	        |«      ||«      S )z+Get a git object header (using git itself).)r   Úget_object_headerr	   r   r
   )r   r   ÚhexshaÚtypenameÚsizes        r   ÚinfozGitCmdObjectDB.info'   s6   € à!%§¡×!<Ñ!<¼ZÈÓ=OÓ!PÑˆ�˜$Ü”Z Ó'¨°4Ó8Ð8r   c                 ó‚   — | j                   j                  t        |«      «      \  }}}}t        t	        |«      |||«      S )zIGet git object data as a stream supporting ``read()`` (using git itself).)r   Ústream_object_datar	   r   r
   )r   r   r   r   r    Ústreams         r   r$   zGitCmdObjectDB.stream,   s;   € à)-¯©×)EÑ)EÄjÐQWÓFXÓ)YÑ&ˆ�˜$ Ü”z &Ó)¨8°T¸6ÓBÐBr   Úpartial_hexshac                 óž   — 	 | j                   j                  |«      \  }}}t        |«      S # t        t        f$ r}t        |«      |‚d}~ww xY w)aF  
        :return:
            Full binary 20 byte sha from the given partial hexsha

        :raise gitdb.exc.AmbiguousObjectName:

        :raise gitdb.exc.BadObject:

        :note:
            Currently we only raise :exc:`~gitdb.exc.BadObject` as git does not
            communicate ambiguous objects separately.
        N)r   r   r
   r   Ú
ValueErrorr   )r   r%   r   Ú	_typenameÚ_sizeÚes         r   Úpartial_to_complete_sha_hexz*GitCmdObjectDB.partial_to_complete_sha_hex3   sO   € ð	3Ø'+§y¡y×'BÑ'BÀ>Ó'RÑ$ˆF�I˜uÜ˜fÓ%Ð%øÜ¤Ð,ò 	3Ü˜NÓ+°Ð2ûð	3ús   ‚), ¬A»AÁA)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   Úbytesr   r!   r   r$   Ústrr+   Ú__classcell__)r   s   @r   r   r      s^   ø„ ñð (ð °ð ¸4õ ð
9˜5ð 9 Uó 9ð
C˜Uð C wó Cð3¸#ð 3À%÷ 3r   N)r/   Ú__all__Ú
gitdb.baser   r   Úgitdb.dbr   r   Ú	gitdb.excr   Úgit.utilr	   r
   Úgit.excr   Útypingr   Ú	git.typesr   Úgit.cmdr   r   © r   r   ú<module>r=      s>   ðñ Jà˜WÐ
%€ç %ß )Ý ç +Ý #õ !å áÝô
)3�]õ )3r   