Hacked By AnonymousFox

Current Path : /opt/cloudlinux/venv/lib/python3.11/site-packages/git/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/git/__pycache__/db.cpython-311.pyc

�

�܋f����dZddlmZmZddlmZmZddlmZddlm	Z	ddl
mZddlm
Z
ddlmZdd	lmZerdd
lmZdZGd�d
e	��ZdS)zBModule with our own gitdb implementation - it uses the git command�)�
bin_to_hex�
hex_to_bin)�OInfo�OStream)�GitDB)�
LooseObjectDB)�	BadObject)�GitCommandError)�
TYPE_CHECKING)�PathLike)�Git)�GitCmdObjectDBrc�`��eZdZdZdeddddf�fd�Zdedefd	�Zdede	fd
�Z
dedefd�Z�xZ
S)
ra=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.
    :note: for now, we use the git command to do all the lookup, just until he
        have packs and the other implementations
    �	root_path�gitr
�returnNc�f��tt|���|��||_dS)z8Initialize this instance with the root and a git commandN)�superr�__init__�_git)�selfrr�	__class__s   ��W/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/git/db.pyrzGitCmdObjectDB.__init__"s,���
�n�d�#�#�,�,�Y�7�7�7���	�	�	��binshac��|j�t|����\}}}tt	|��||��S)N)r�get_object_headerrrr)rr�hexsha�typename�sizes     r�infozGitCmdObjectDB.info's@��!%��!<�!<�Z��=O�=O�!P�!P����$��Z��'�'��4�8�8�8rc��|j�t|����\}}}}tt	|��|||��S)z)For now, all lookup is done by git itself)r�stream_object_datarrr)rrrrr �streams      rr$zGitCmdObjectDB.stream+sE��)-��)E�)E�j�QW�FX�FX�)Y�)Y�&���$���z�&�)�)�8�T�6�B�B�Br�partial_hexshac��	|j�|��\}}}t|��S#ttf$r}t|��|�d}~wwxYw)z�:return: Full binary 20 byte sha from the given partial hexsha
        :raise AmbiguousObjectName:
        :raise BadObject:
        :note: currently we only raise BadObject as git does not communicate
            AmbiguousObjects separatelyN)rrrr
�
ValueErrorr	)rr%r�	_typename�_size�es      r�partial_to_complete_sha_hexz*GitCmdObjectDB.partial_to_complete_sha_hex2se��	3�'+�y�'B�'B�>�'R�'R�$�F�I�u��f�%�%�%����,�	3�	3�	3��N�+�+��2�����	3���s�,/�A�A�A)�__name__�
__module__�__qualname__�__doc__rr�bytesrr!rr$�strr+�
__classcell__)rs@rrrs�����������(����4�������
9�5�9�U�9�9�9�9�C�U�C�w�C�C�C�C�
3�#�
3�%�
3�
3�
3�
3�
3�
3�
3�
3rrN)r/�git.utilrr�
gitdb.baserr�gitdb.dbrr�	gitdb.excr	�git.excr
�typingr�	git.typesr�git.cmdr
�__all__r�rr�<module>r=s���H�H�+�+�+�+�+�+�+�+�%�%�%�%�%�%�%�%�������"�"�"�"�"�"�������#�#�#�#�#�#�!� � � � � ���������������
&��$3�$3�$3�$3�$3�]�$3�$3�$3�$3�$3r

Hacked By AnonymousFox1.0, Coded By AnonymousFox