XylotrechusZ
�
� hl � �
� d Z ddlmZ ddlmZ ddlmZmZ ddlm Z ddl
mZmZm
Z
mZmZmZmZ ddlmZ e
rdd lmZ eZd
ZdZdZd
ZdZdZ G d� de� � Z G d� de� � Z G d� de � � Z! G d� de!� � Z"dS )z.Module with additional types used by the index� )�b2a_hex)�Path� )�pack�unpack)�Blob)�
NamedTuple�Sequence�
TYPE_CHECKING�Tuple�Union�cast�List)�PathLike)�Repo)�
BlobFilter�BaseIndexEntry�
IndexEntry� StageTypei� i 0 i @ i � � c �R � e Zd ZdZdZdee ddfd�Zdee e
f defd�ZdS )r z�
Predicate to be used by iter_blobs allowing to filter only return blobs which
match the given list of directories or files.
The given paths are given relative to the repository.
�paths�returnNc � � || _ dS )z�
:param paths:
tuple or list of paths which are either pointing to directories or
to files relative to the current repository
N)r )�selfr s �^/builddir/build/BUILD/cloudlinux-venv-1.0.8/venv/lib/python3.11/site-packages/git/index/typ.py�__init__zBlobFilter.__init__. s � � ��
�
�
� �
stage_blobc �~ � |d j }t |t � � r|nt |� � }| j D ]�}t |t � � r|nt |� � }|j }|j }t |� � t |� � k r�Wt
d� t ||� � D � � � � r dS ��dS )Nr c 3 �( K � | ]
\ }}||k V � �d S )N� )�.0�i�js r � <genexpr>z&BlobFilter.__call__.<locals>.<genexpr>@ s* � � � �D�D�d�a��1��6�D�D�D�D�D�Dr TF)�path�
isinstancer r �parts�len�all�zip)r r �
blob_pathlike� blob_path�pathliker'