OwlCyberSecurity - MANAGER
Edit File: db.cpython-311.pyc
� ������h�����������������������������d�Z�ddlmZmZ�ddlmZmZ�ddlmZ�ddlm Z �ddl mZ�ddlm Z �ddlmZ�dd lmZ�erdd lmZ�dZ�G�d��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)�GitCmdObjectDBr���c��������������������`�������e�Zd�ZdZdeddddf��fd�Zdedefd �Zdede fd �Z dedefd�Z��xZ S�) r���a=��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������t����������t����������|����������������������������������|�������������||�_��������dS�)z8Initialize this instance with the root and a git commandN)�superr����__init__�_git)�selfr���r���� __class__s��� ��W/builddir/build/BUILD/cloudlinux-venv-1.0.8/venv/lib/python3.11/site-packages/git/db.pyr���zGitCmdObjectDB.__init__"���s,������� �n�d�#�#�,�,�Y�7�7�7��� � � ������binshac�����������������������|�j������������������������������t����������|������������������������\��}}}t����������t ����������|������������||������������S�)N)r����get_object_headerr���r���r���)r���r����hexsha�typename�sizes��� r����infozGitCmdObjectDB.info'���s@������!%��!<�!<�Z��=O�=O�!P�!P����$��Z��'�'��4�8�8�8r���c�����������������������|�j������������������������������t����������|������������������������\��}}}}t����������t ����������|������������|||������������S�)z)For now, all lookup is done by git itself)r����stream_object_datar���r���r���)r���r���r���r���r ����streams��� r���r$���zGitCmdObjectDB.stream+���sE������)-��)E�)E�j�QW�FX�FX�)Y�)Y�&���$���z�&�)�)�8�T�6�B�B�Br����partial_hexshac����������������������� �|�j������������������������������|������������\��}}}t����������|������������S�#�t����������t����������f$�r}t����������|������������|�d}~ww�xY�w)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)r���r���r���r ���� ValueErrorr ���)r���r%���r���� _typename�_size�es��� r����partial_to_complete_sha_hexz*GitCmdObjectDB.partial_to_complete_sha_hex2���se������ 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����bytesr���r!���r���r$����strr+���� __classcell__)r���s���@r���r���r������s��������������������(������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�� 3r���r���N)r/����git.utilr���r���� gitdb.baser���r����gitdb.dbr���r���� gitdb.excr ����git.excr ����typingr���� git.typesr����git.cmdr ����__all__r�����r���r����<module>r=������s�������H��H��+��+��+��+��+��+��+��+��%��%��%��%��%��%��%��%��������������"��"��"��"��"��"��������������#��#��#��#��#��#��!�� �� �� �� �� ���������������������� �&��$3��$3��$3��$3��$3�]��$3��$3��$3��$3��$3r���