403Webshell
Server IP : 198.38.94.13  /  Your IP : 216.73.217.33
Web Server : Apache
System : Linux d4744.dxb1.stableserver.net 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64
User : revivere ( 1140)
PHP Version : 8.2.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/saltstack/salt/lib/python3.10/site-packages/git/objects/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/saltstack/salt/lib/python3.10/site-packages/git/objects/__pycache__/fun.cpython-310.pyc
o

;j�"�@s�dZgd�ZddlmZddlmZmZddlmZm	Z	m
Z
mZmZm
Z
mZmZe
r6ddlmZddlmZeeeefZeedfZd	eed
edgeedffddfd
d�Zdede	efdd�Zde
ededededef
dd�Zedddeddfdd��Zedededefdd��Zdededefdd�Zddd eeedfdede	eed!ffd"d#�Zddd$edede	efd%d&�ZdS)'z6Functions that are supposed to be as fast as possible.)�tree_to_stream�tree_entries_from_data�traverse_trees_recursive�traverse_tree_recursive�)�S_ISDIR)�safe_decode�defenc)�Callable�List�MutableSequence�Sequence�Tuple�
TYPE_CHECKING�Union�overload)�ReadableBuffer)�GitCmdObjectDBN�entries�writer�returnc
	Cs�td�}d}|D]B\}}}d}td�D]}t||d?|@|g�|}q|d|kr1|dd�}t|t�r<|�t�}	n|}	|d�|d	|	d
|f��qdS)z�Write the given list of entries into a stream using its ``write`` method.

    :param entries:
        **Sorted** list of tuples with (binsha, mode, name).

    :param write:
        A ``write`` method which takes a data string.
    �0����r�N� �)�ord�range�bytes�
isinstance�str�encoder�join)
rr�ord_zeroZbit_maskZbinsha�mode�nameZmode_str�i�
name_bytes�r*�C/opt/saltstack/salt/lib/python3.10/site-packages/git/objects/fun.pyr)s	 
�r�datacCs�td�}td�}t|�}d}g}||krld}|||kr0|d>|||}|d7}|||ks|d7}|}||dkrF|d7}||dks<|||�}t|�}	|d7}|||d�}
|d}|�|
||	f�||ks|S)z�Read the binary representation of a tree and returns tuples of
    :class:`~git.objects.tree.Tree` items.

    :param data:
        Data block with tree data (as bytes).

    :return:
        list(tuple(binsha, mode, tree_relative_path), ...)
    r� rrr�)r�lenr�append)r,r%Z	space_ordZlen_datar(�outr&�nsr)r'�shar*r*r+rMs0
���"r�	tree_datar'�is_dir�start_atcCs�z||}|r|d|krt|d�|krd||<|WSWn	ty&Ynwt|�D]\}}|rG|d|krGt|d�|krGd||<|Sq+dS)z�Return data entry matching the given name and tree mode or ``None``.

    Before the item is returned, the respective data item is set None in the `tree_data`
    list to mark it done.
    �rN)r�
IndexError�	enumerate)r4r'r5r6�item�indexr*r*r+�
_find_by_name�s �� �r<r:�path_prefixcC�dS�Nr*�r:r=r*r*r+�
_to_full_path��rAcCr>r?r*r@r*r*r+rA�rBcCs"|s|S|d|d||dfS)z%Rebuild entry with given path prefix.rrr7r*r@r*r*r+rA�s�odbr�	tree_shas.c	s0g}t|�}|D]}|durg}ntt|�|�����}|�|�qg}t|�D]m\}}	t|	�D]_\}
}|s7q0dd�t|�D�}|||<|\}
}}t|�}t|d||�D]}||}t	|||||
�||<qV|r}|�
t|dd�|D��|d��n|�t�fdd�|D���d|	|
<q0|	dd�=q(|S)	a%
    :return:
        List of list with entries according to the given binary tree-shas.

        The result is encoded in a list
        of n tuple|None per blob/commit, (n == len(tree_shas)), where:

        * [0] == 20 byte sha
        * [1] == mode as int
        * [2] == path relative to working tree root

        The entry tuple is ``None`` if the respective blob/commit did not exist in the
        given tree.

    :param tree_shas:
        Iterable of shas pointing to trees. All trees must be on the same level.
        A tree-sha may be ``None``, in which case ``None``.

    :param path_prefix:
        A prefix to be added to the returned paths on this level.
        Set it ``""`` for the first iteration.

    :note:
        The ordering of the returned items will be partially lost.
    NcSsg|]}d�qSr?r*)�.0�_r*r*r+�
<listcomp>�sz,traverse_trees_recursive.<locals>.<listcomp>rcSsg|]
}|r
|dpd�qS)rNr*)rE�eir*r*r+rG�s�/c3s�|]}t|��VqdSr?)rA)rE�e�r=r*r+�	<genexpr>�s�z+traverse_trees_recursive.<locals>.<genexpr>)
r/�listr�stream�readr0r9rrr<�extendr�tuple)rCrDr=Z
trees_data�nt�tree_shar,r1Ztir4�iir:rZ_shar&r'r5Ztior*rKr+r�s>

��
rrScCsbg}t|�|����}|D]!\}}}t|�r$|�t||||d��q
|�||||f�q
|S)aA
    :return:
        List of entries of the tree pointed to by the binary `tree_sha`.

        An entry has the following format:

        * [0] 20 byte sha
        * [1] mode as int
        * [2] path relative to the repository

    :param path_prefix:
        Prefix to prepend to the front of all returned paths.
    rI)rrNrOrrPrr0)rCrSr=rr,r3r&r'r*r*r+rsr) �__doc__�__all__�statrZ
git.compatrr�typingr	r
rrr
rrrZ	_typeshedr�gitrr �intr"ZEntryTupZEntryTupOrNonerr�boolr<rArrr*r*r*r+�<module>s8(,$"4���
�"X

Youez - 2016 - github.com/yon3zu
LinuXploit