§
    ÎÑßj  ã                   óÈ   — 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dS )Ú	Referenceé    N)ÚIterableObjÚ	LazyMixiné   )ÚSymbolicReferenceÚT_References)ÚAnyÚCallableÚIteratorÚTYPE_CHECKINGÚTypeÚUnion)ÚAnyGitObjectÚPathLikeÚ_T)ÚRepoÚfunc.Úreturnc                 óV   ‡ — 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                 ól   •— |                       ¦   «         st          d| j        z  ¦  «        ‚ ‰| g|¢R Ž S )Nz1ref path does not point to a remote reference: %s)Ú	is_remoteÚ
ValueErrorÚpath)r   r   r   s     €úF/opt/saltstack/salt/lib/python3.11/site-packages/git/refs/reference.pyÚwrapperz(require_remote_ref_path.<locals>.wrapper   sF   ø€ Ø�~Š~ÑÔð 	^ÝÐPÐSWÔS\Ñ\Ñ]Ô]Ð]Øˆt�DÐ ˜4Ð Ð Ð Ð ó    )r   r	   r   Ú__name__)r   r   s   ` r   Úrequire_remote_ref_pathr       sG   ø€ ð!•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                 óð   •— |rNt          j        |¦  «                             | j        dz   ¦  «        st	          d| j        j        ›d|› �¦  «        ‚|  t          ¦   «                              ||¦  «         dS )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   s   ø€ ð ð 	a�bœi¨™oœo×8Ò8¸Ô9RÐUXÑ9XÑYÔYð 	aÝÐ_°4´>Ô3JÐ_Ð_ÐY]Ð_Ð_Ñ`Ô`Ð`ØˆÝ‰Œ×Ò˜˜tÑ$Ô$Ð$Ð$Ð$r   c                 ó   — | j         S ©N)Úname)r   s    r   Ú__str__zReference.__str__J   s
   € ØŒyÐr   Úobjectr   Úlogmsgc                 óì   •— d}|�*| j         j        }|j        s|j        | k    r| j        j        }t          ¦   «                              ||¦  «         |� | 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   s   ø€ ð ˆ	ØÐØ”9”>ˆDØÔ#ð /¨¬°DÒ(8Ð(8Ø œKÔ.�	õ 	‰Œ×Ò˜6 6Ñ*Ô*Ð*àÐ ð ŒIŒN×%Ò% i°Ñ8Ô8Ð8ð ˆr   c                 ó¤   — | j                              d¦  «        }t          |¦  «        dk     r| j         S d                     |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   sH   € ð ”—’ Ñ%Ô%ˆÝˆv‰;Œ;˜Š?ˆ?Ø”9ÐØ�xŠx˜˜q˜r˜rœ
Ñ#Ô#Ð#r   ÚclsÚcommon_pathr   Úkwargsc                 ó.   — |                       ||¦  «        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Ô1Ð1r   c                 óF   — | 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                 óp   — | j                              d¦  «        }d                     |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£   s1   € ð ”—’ Ñ%Ô%ˆØ�xŠx˜˜q˜r˜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   *   sø  ø€ € € € € ðð ð €Ià#ÐØ!ÐØ!Ðð%ð %˜Vð %¨8ð %Àð %ÐQUð %ð %ð %ð %ð %ð %ð&˜ð ð ð ð ð $(ð%ð %à�lÐ$7¸Ð<Ô=ð%ð �c˜4�iÔ ð%ð 
ð	%ð %ð %ð %ð %ð %ðR ð
$�cð 
$ð 
$ð 
$ñ „Xð
$ð ð .2ð
2ð 
2Ø�,Ôð
2àð
2ð ˜8 T˜>Ô*ð
2ð ð	
2ð
 ð
2ð 
�,Ô	ð
2ð 
2ð 
2ñ „[ð
2ð  Øð˜Sð ð ð ñ Ôñ „Xðð Øð
$˜Sð 
$ð 
$ð 
$ñ Ôñ „Xð
$ð 
$ð 
$ð 
$ð 
$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      s)  ðð ˆ-€à 	€	€	€	Ø +Ð +Ð +Ð +Ð +Ð +Ð +Ð +à 5Ð 5Ð 5Ð 5Ð 5Ð 5Ð 5Ð 5ð GÐ FÐ FÐ FÐ FÐ FÐ FÐ FÐ FÐ FÐ FÐ FÐ FÐ FÐ FÐ Fà 0Ð 0Ð 0Ð 0Ð 0Ð 0Ð 0Ð 0Ð 0Ð 0àð ØÐÐÐÐÐð (¨3°¨7Ô"3ð ¸ÀÀbÀÔ8Ið ð ð ð ð"E$ð E$ð E$ð E$ð E$Ð! 9¨kñ E$ô E$ð E$ð E$ð E$r   