Hacked By AnonymousFox

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

�

�܋f4
���ddlZddlmZddlmZddlmZddlZddlm	Z	m
Z
mZmZddl
mZer$ddlmZdd	lmZdd
lmZddlmZddlmZdd
lmZdZdedefd�Zdedefd�Zdddeddfd�Zde
ddeddfd�ZGd�de��ZdS) �N)�InvalidGitRepositoryError)�GitConfigParser)�BytesIO)�Any�Sequence�
TYPE_CHECKING�Union)�PathLike�)�	Submodule)�
ReferenceType)�Repo)�Head)�Remote)�RemoteReference)�
sm_section�sm_name�mkhead�find_first_remote_branch�SubmoduleConfigParser�name�returnc��d|�d�S)z=:return: section title used in .gitmodules configuration filezsubmodule "�"�)rs �k/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/git/objects/submodule/util.pyrr"s�� �� � � � ��sectionc�>�|���}|dd�S)z>:return: name of the submodule as parsed from the section name����)�strip)rs rrr's���m�m�o�o�G��2�b�5�>�r�repor�pathrc�f�tj|tj�|����S)z!:return: New branch/head instance)�gitr�to_full_path)r#r$s  rrr-s$���8�D�#�(�/�/��5�5�6�6�6r�remotesr�branch_namerc�n�|D]!}	|j|cS#t$rY�wxYwtd|z���)z_Find the remote branch matching the name of the given branch or raise InvalidGitRepositoryErrorz:Didn't find remote branch '%r' in any of the given remotes)�refs�
IndexErrorr)r(r)�remotes   rrr2s`������	��;�{�+�+�+�+���	�	�	��H�	����$�$`�cn�$n�
o�
o�os��
"�"c�L��eZdZdZdededdf�fd�Zdd	�Zd
d
�Zd
�fd�Z�xZ	S)raX
    Catches calls to _write, and updates the .gitmodules blob in the index
    with the new data, if we have written into a stream. Otherwise it will
    add the local file to the index to make it correspond with the working tree.
    Additionally, the cache must be cleared

    Please note that no mutating method will work in bare mode
    �args�kwargsrNc�r��d|_d|_d|_tt|��j|i|��dS)NT)�_smref�_index�_auto_write�superr�__init__)�selfr/r0�	__class__s   �rr6zSubmoduleConfigParser.__init__OsB���?C���������3��#�T�*�*�3�T�D�V�D�D�D�D�Dr�	submodulerc�8�tj|��|_dS)z`Set this instance's submodule. It must be called before
        the first write operation beginsN)�weakref�refr2)r7r9s  r�
set_submodulez#SubmoduleConfigParser.set_submoduleVs���k�)�,�,����rc��|j�J�t|jt��rJ�|���}|�M|j}|�|jj}|�|jg|j	���|�
��dSdS)z4Flush changes in our configuration file to the indexN)�write)r2�
isinstance�_file_or_filesrr3r#�index�add�k_modules_filer4�_clear_cache)r7�smrBs   r�flush_to_indexz$SubmoduleConfigParser.flush_to_index[s����{�&�&�&��d�1�7�;�;�;�;�;�
�[�[�]�]��
�>��K�E��}���
���I�I�r�(�)��1A�I�B�B�B��O�O������
�>rc�~��tt|�����}|���|S)N)r5rr?rG)r7�rvalr8s  �rr?zSubmoduleConfigParser.writens6����0�$�7�7�=�=�?�?���������r)r9rrN)rN)
�__name__�
__module__�__qualname__�__doc__rr6r=rGr?�
__classcell__)r8s@rrrDs����������E�c�E�S�E�T�E�E�E�E�E�E�-�-�-�-�

�
�
�
�&���������rr)r&�git.excr�
git.configr�iorr;�typingrrrr	�	git.typesr
�baserr
�git.repor�git.refsrrr�__all__�strrrrrrrrr�<module>rYs���
�
�
�
�-�-�-�-�-�-�&�&�&�&�&�&�����������
7�6�6�6�6�6�6�6�6�6�6�6��������)�������%�%�%�%�%�%�������������������(�(�(�(�(�(���!�S�!�S�!�!�!�!�
�S��S�����7��7�x�7�F�7�7�7�7�
	p�h�x�&8�	p�s�	p�O`�	p�	p�	p�	p�$-�-�-�-�-�O�-�-�-�-�-r

Hacked By AnonymousFox1.0, Coded By AnonymousFox