Ë
    ùmxiµ  ã                   ó  — g d ¢Z ddlmZ ddlZddlZddlmZ ddlmZ ddl	m
Z
mZmZmZ ddlmZ er 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 dedefd„Zdedefd„Zdddeddfd„Zded   deddfd„Z G d„ de«      Zy))Ú
sm_sectionÚsm_nameÚmkheadÚfind_first_remote_branchÚSubmoduleConfigParseré    )ÚBytesION)ÚGitConfigParser)ÚInvalidGitRepositoryError)ÚAnyÚSequenceÚTYPE_CHECKINGÚUnion)ÚPathLike)ÚReferenceType)ÚHeadÚRemoteReference)ÚRemote)ÚRepoé   )Ú	SubmoduleÚnameÚreturnc                 ó   — d| › d�S )zA:return: Section title used in ``.gitmodules`` configuration filezsubmodule "ú"© )r   s    úQ/home/htdocs/ttos/venv/lib/python3.12/site-packages/git/objects/submodule/util.pyr   r   %   s   € à˜˜˜aÐ Ð ó    Úsectionc                 ó,   — | j                  «       } | dd S )z>:return: Name of the submodule as parsed from the section nameé   éÿÿÿÿ)Ústrip)r   s    r   r   r   *   s   € à�m‰m‹o€GØ�2�bˆ>Ðr   Úrepor   Úpathr   c                 óh   — t        j                  | t         j                  j                  |«      «      S )z!:return: New branch/head instance)Úgitr   Úto_full_path)r#   r$   s     r   r   r   0   s"   € ä�8‰8�Dœ#Ÿ(™(×/Ñ/°Ó5Ó6Ð6r   Úremotesr   Úbranch_namer   c                 ól   — | D ]  }	 |j                   |   c S  t        d|z  «      ‚# t        $ r Y Œ/w xY w)ztFind the remote branch matching the name of the given branch or raise
    :exc:`~git.exc.InvalidGitRepositoryError`.z:Didn't find remote branch '%r' in any of the given remotes)ÚrefsÚ
IndexErrorr
   )r(   r)   Úremotes      r   r   r   5   sO   € ð ò ˆð	Ø—;‘;˜{Ñ+Ò+ðô $Ð$`ÐcnÑ$nÓ
oÐoøô	 ò 	Ùð	ús   ‡'§	3²3c                   óL   ‡ — e Zd ZdZdededdfˆ fd„Zd
d„Zdd„Zdˆ fd	„Zˆ xZ	S )r   a‚  Catches calls to :meth:`~git.config.GitConfigParser.write`, and updates the
    ``.gitmodules`` blob in the index with the new data, if we have written into a
    stream.

    Otherwise it would 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Úkwargsr   Nc                 óN   •— d | _         d | _        d| _        t        ‰| �  |i |¤Ž y )NT)Ú_smrefÚ_indexÚ_auto_writeÚsuperÚ__init__)Úselfr/   r0   Ú	__class__s      €r   r6   zSubmoduleConfigParser.__init__R   s+   ø€ Ø?CˆŒØˆŒØˆÔÜ‰Ñ˜$Ð) &Ó)r   c                 ó8   — t        j                  |«      | _        y)zaSet this instance's submodule. It must be called before the first write
        operation begins.N)ÚweakrefÚrefr2   )r7   Ú	submodules     r   Úset_submodulez#SubmoduleConfigParser.set_submoduleY   s   € ô —k‘k )Ó,ˆ�r   c                 ó6  — | j                   €J ‚t        | j                  t        «      rJ ‚| j                  «       }|�]| j                  }|€|j
                  j                  }|j                  |j                  g| j                  ¬«       |j                  «        yy)z5Flush changes in our configuration file to the index.N)Úwrite)r2   Ú
isinstanceÚ_file_or_filesr   r3   r#   ÚindexÚaddÚk_modules_filer4   Ú_clear_cache)r7   ÚsmrB   s      r   Úflush_to_indexz$SubmoduleConfigParser.flush_to_index^   s�   € à�{‰{Ð&Ð&Ð&ä˜d×1Ñ1´7Ô;Ð;Ð;à�[‰[‹]ˆØˆ>Ø—K‘KˆEØˆ}ØŸ™Ÿ™�à�I‰I�r×(Ñ(Ð)°×1AÑ1AˆIÔBØ�O‰OÕð r   c                 óD   •— t         ‰| �  «       }| j                  «        |S )N)r5   r?   rG   )r7   Úrvalr8   s     €r   r?   zSubmoduleConfigParser.writeq   s   ø€ Ü‘W‘]“_ˆØ×ÑÔØˆr   )r<   r   r   N)r   N)
Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r6   r=   rG   r?   Ú__classcell__)r8   s   @r   r   r   G   s6   ø„ ñð*˜cð *¨Sð *°Tõ *ó-ó
÷&ñ r   r   ) Ú__all__Úior   r:   r&   Ú
git.configr	   Úgit.excr
   Útypingr   r   r   r   Ú	git.typesr   r   Úgit.refsr   r   Ú
git.remoter   Úgit.repor   Úbaser   Ústrr   r   r   r   r   r   r   r   ú<module>rZ      sª   ðò€õ Û ã 
Ý &Ý -÷ 7Ó 6å áÝ%ç.Ý!Ýåð
!�Sð !˜Só !ð
�Sð ˜Só ð7�ð 7˜xð 7¨Fó 7ð

p h¨xÑ&8ð 
pÀsð 
pÐO`ó 
pô$-˜Oõ -r   