Ë
    ùmxi  ã                   ó´   — d gZ ddlZddlmZmZ ddlmZmZ ddlm	Z	m
Z
mZmZmZmZ ddlmZmZmZ erddlmZ d	e
d
ef   de
d
ef   fd„Z G d„ d eee«      Zy)Ú	Referenceé    N)ÚIterableObjÚ	LazyMixiné   )ÚSymbolicReferenceÚT_References)ÚAnyÚCallableÚIteratorÚTYPE_CHECKINGÚTypeÚUnion)ÚAnyGitObjectÚPathLikeÚ_T)ÚRepoÚfunc.Úreturnc                 óZ   ‡ — dt         dt        dt        fˆ fd„}‰ j                  |_        |S )zZA decorator raising :exc:`ValueError` if we are not a valid remote, based on the
    path.ÚselfÚargsr   c                 óf   •— | j                  «       st        d| j                  z  «      ‚ ‰| g|¢­Ž S )Nz1ref path does not point to a remote reference: %s)Ú	is_remoteÚ
ValueErrorÚpath)r   r   r   s     €úI/home/htdocs/ttos/venv/lib/python3.12/site-packages/git/refs/reference.pyÚwrapperz(require_remote_ref_path.<locals>.wrapper   s5   ø€ Ø�~‰~ÔÜÐPÐSW×S\ÑS\Ñ\Ó]Ð]Ù�DÐ ˜4Ò Ð ó    )r   r	   r   Ú__name__)r   r   s   ` r   Úrequire_remote_ref_pathr       s0   ø€ ð!”lð !¬3ð !´2õ !ð —}‘}€GÔØ€Nr   c                   ó  ‡ — e Zd ZdZdZdZdZdZdddded	e	d
dfˆ fd„Z
d
efd„Z	 ddeedef   deedf   d
d fˆ fd„Zed
efd„«       Ze	 ddee   dddeedf   deded
ee   fd„«       Zeed
efd„«       «       Zeed
efd„«       «       Zˆ xZS )r   z˜A named reference to any object.

    Subclasses may apply restrictions though, e.g., a :class:`~git.refs.head.Head` can
    only point to commits.
    © FTÚrefsÚrepor   r   Ú
check_pathr   Nc                 óÚ   •— |rVt        j                  |«      j                  | j                  dz   «      s%t	        d| j
                  j                  ›d|› �«      ‚|  t        ‰| �!  ||«       y)a”  Initialize this instance.

        :param repo:
            Our parent repository.

        :param path:
            Path relative to the ``.git/`` directory pointing to the ref in question,
            e.g. ``refs/heads/master``.

        :param check_path:
            If ``False``, you can provide any path.
            Otherwise the path must start with the default path prefix of this type.
        ú/zCannot instantiate z from path N)	ÚosÚfspathÚ
startswithÚ_common_path_defaultr   Ú	__class__r   ÚsuperÚ__init__)r   r$   r   r%   r,   s       €r   r.   zReference.__init__7   sa   ø€ ñ œbŸi™i¨›o×8Ñ8¸×9RÑ9RÐUXÑ9XÔYÜÐ2°4·>±>×3JÑ3JÐ2MÈ[ÐY]ÐX^Ð_Ó`Ð`ÙÜ‰Ñ˜˜tÕ$r   c                 ó   — | j                   S ©N)Úname)r   s    r   Ú__str__zReference.__str__J   s   € Ø�y‰yÐr   Úobjectr   Úlogmsgc                 ó  •— d}|�G| j                   j                  }|j                  s%|j                  | k(  r| j                  j
                  }t        ‰| �  ||«       |�&| j                   j                  j                  ||«       | S )zqSpecial version which checks if the head-log needs an update as well.

        :return:
            self
        N)	r$   ÚheadÚis_detachedÚrefÚcommitÚbinshar-   Ú
set_objectÚ
log_append)r   r3   r4   Ú	oldbinshar6   r,   s        €r   r;   zReference.set_objectP   sx   ø€ ð ˆ	ØÐØ—9‘9—>‘>ˆDØ×#Ò#¨¯©°DÒ(8Ø ŸK™K×.Ñ.�	ô 	‰Ñ˜6 6Ô*àÐ ð �I‰I�N‰N×%Ñ% i°Ô8ð ˆr   c                 ó”   — | j                   j                  d«      }t        |«      dk  r| j                   S dj                  |dd «      S )zi
        :return:
            (shortest) Name of this reference - it may contain path components
        r'   é   é   N)r   ÚsplitÚlenÚjoin©r   Útokenss     r   r1   zReference.namey   s@   € ð —‘—‘ Ó%ˆÜˆv‹;˜Š?Ø—9‘9ÐØ�x‰x˜˜q˜r˜
Ó#Ð#r   ÚclsÚcommon_pathr   Úkwargsc                 ó&   — | j                  ||«      S )z¥Equivalent to
        :meth:`SymbolicReference.iter_items <git.refs.symbolic.SymbolicReference.iter_items>`,
        but will return non-detached references as well.)Ú_iter_items)rF   r$   rG   r   rH   s        r   Ú
iter_itemszReference.iter_items†   s   € ð �‰˜t [Ó1Ð1r   c                 óB   — | j                   j                  d«      }|d   S )z˜
        :return:
            Name of the remote we are a reference of, such as ``origin`` for a reference
            named ``origin/master``.
        r'   r@   )r   rA   rD   s     r   Úremote_namezReference.remote_name—   s    € ð —‘—‘ Ó%ˆà�a‰yÐr   c                 ó`   — | j                   j                  d«      }dj                  |dd «      S )zÐ
        :return:
            Name of the remote head itself, e.g. ``master``.

        :note:
            The returned name is usually not qualified enough to uniquely identify a
            branch.
        r'   r?   N)r   rA   rC   rD   s     r   Úremote_headzReference.remote_head£   s+   € ð —‘—‘ Ó%ˆØ�x‰x˜˜q˜r˜
Ó#Ð#r   )Tr0   )r   Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__Ú_points_to_commits_onlyÚ_resolve_ref_on_creater+   r   Úboolr.   Ústrr2   r   r   r;   Úpropertyr1   Úclassmethodr   r   r	   r   rK   r    rM   rO   Ú__classcell__)r,   s   @r   r   r   *   sQ  ø„ ñð €Ià#ÐØ!ÐØ!Ðñ%˜Vð %¨8ð %Àð %ÐQUõ %ð&˜ó ð $(ñ%à�lÐ$7¸Ð<Ñ=ð%ð �c˜4�iÑ ð%ð 
õ	%ðR ð
$�cò 
$ó ð
$ð ð .2ñ
2Ø�,Ñð
2àð
2ð ˜8 T˜>Ñ*ð
2ð ð	
2ð
 ð
2ð 
�,Ñ	ò
2ó ð
2ð  Øð˜Sò ó ó ðð Øð
$˜Sò 
$ó ó ô
$r   )Ú__all__r(   Úgit.utilr   r   Úsymbolicr   r   Útypingr	   r
   r   r   r   r   Ú	git.typesr   r   r   Úgit.repor   r    r   r"   r   r   ú<module>ra      sd   ðð ˆ-€ã 	ß +ç 5÷ G× Fç 0Ñ 0áÝð (¨3°¨7Ñ"3ð ¸ÀÀbÀÑ8Ió ô"E$Ð! 9¨kõ E$r   