Hacked By AnonymousFox
�
�܋f& � � � d dl mZmZ ddlmZmZ d dlmZmZm Z m
Z
mZmZ d dl
mZmZmZ erd dlmZ dgZded ef d
ed ef fd�Z G d� deee� � Zd
S )� )� LazyMixin�IterableObj� )�SymbolicReference�T_References)�Any�Callable�Iterator�Type�Union�
TYPE_CHECKING)�
Commit_ish�PathLike�_T)�Repo� Reference�func.�returnc �V � � dt dt dt f� fd�}� j |_ |S )zOA decorator raising a TypeError if we are not a valid remote, based on the path�self�argsr c �l �� | � � � st d| j z � � � �| g|�R � S )Nz1ref path does not point to a remote reference: %s)� is_remote�
ValueError�path)r r r s ��c/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/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 Zd ZdZdZdZdZdZdddded e d
df� fd�
Z
d
efd
�Z dde
edef de
edf d
d f� fd�
Zed
efd�� � Ze ddee ddde
edf deded
ee fd�� � Zeed
efd�� � � � Zeed
efd�� � � � Z� xZS )r zRepresents a named reference to any object. Subclasses may apply restrictions though,
i.e. Heads can only point to commits.� FT�refs�repor r �
check_pathr Nc �� �� |rIt |� � � | j dz � � st d| j j �d|� �� � �| t
t | � � � ||� � dS )ab Initialize this instance
:param repo: Our parent repository
:param path:
Path relative to the .git/ directory pointing to the ref in question, i.e.
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.�/zCannot instantiate z from path N) �str�
startswith�_common_path_defaultr � __class__r �superr �__init__)r r$ r r% r+ s �r r- zReference.__init__2 s� �� � � a�c�$�i�i�2�2�4�3L�s�3R�S�S� a��_�4�>�3J�_�_�Y]�_�_�`�`�`���
�i����'�'��d�3�3�3�3�3r c � � | j S �N)�name)r s r �__str__zReference.__str__@ s
� ��y�r �objectr �logmsgc � �� d}|�*| j j }|j s|j | k r| j j }t
t | � � � ||� � |� | j j � ||� � | S )z[Special version which checks if the head-log needs an update as well
:return: selfN)
r$ �head�is_detached�ref�commit�binshar, r �
set_object�
log_append)r r2 r3 � oldbinshar5 r+ s �r r: zReference.set_objectF s� �� � � ����9�>�D��#�
/���D�(8�(8� �K�.� � �i����)�)�&�&�9�9�9�� �
�I�N�%�%�i��8�8�8� �r c � � | j � d� � }t |� � dk r| j S d� |dd� � � S )zK:return: (shortest) Name of this reference - it may contain path componentsr'