HEX
Server: Apache
System: Linux infong-uk86 4.4.400-icpu-106 #2 SMP Mon Sep 15 08:23:40 UTC 2025 x86_64
User: u44115835 (4976590)
PHP: 8.4.17
Disabled: NONE
Upload Files
File: //kunden/lib/python3/dist-packages/dulwich/__pycache__/stash.cpython-39.pyc
a

3۾_0�@sXdZddlmZddlZddlmZddlmZmZddl	m
Z
dZGdd	�d	e�Z
dS)
zStash handling.�)�absolute_importN)�GitFile)�commit_tree�iter_fresh_objects)�read_reflogs
refs/stashc@sZeZdZdZefdd�Zdd�Zedd��Zdd	�Z	d
d�Z
dd
d�Zdd�Zdd�Z
dS)�StashzPA Git stash.

    Note that this doesn't currently update the working tree.
    cCs||_||_dS�N)�_ref�_repo)�self�repo�ref�r�//usr/lib/python3/dist-packages/dulwich/stash.py�__init__,szStash.__init__cCsztj�|j��dt�|j��}z@t|d��"}tt	t
|���Wd�WS1sR0YWntytgYS0dS)NZlogs�rb)�os�path�joinr
Z	commondir�fsdecoder	r�reversed�listr�FileNotFoundError)rZreflog_path�frrr�stashes0s�4z
Stash.stashescCs||�S)z&Create a new stash from a Repo object.r)�clsrrrr�	from_repo9szStash.from_repocCst|j��dS)z Drop entry with specified index.N��NotImplementedError�drop�r�indexrrrr>sz
Stash.dropcCst|j��dSrrr rrr�popBsz	Stash.popNc
Cs�i}|dur||d<|dur$||d<|j��}|�|jj�}|jjfd|d|j��gd�|��}t|jjt|t�	|jj
�|jjd��}|dur�d|j��}|j��|jj|j<|jjf|j|||gd�|��}	|	S)z�Create a new stash.

        Args:
          committer: Optional committer name to use
          author: Optional author name to use
          message: Optional commit message
        N�	committer�authorsIndex stash)r
Ztree�messageZmerge_heads)�object_storesA stash on )
r
Z
open_indexZcommitr&Z	do_commit�headrrr�fsencoderZrefsr	)
rr#r$r%Z
commit_kwargsr!Z
index_tree_idZindex_commit_idZ
stash_tree_idZcidrrr�pushEs@	

������z
Stash.pushcCst|���|Sr)rrr rrr�__getitem__qszStash.__getitem__cCstt|����Sr)�lenrr)rrrr�__len__tsz
Stash.__len__)NNN)�__name__�
__module__�__qualname__�__doc__�DEFAULT_STASH_REFrr�classmethodrrr"r)r*r,rrrrr&s	

,r)r0Z
__future__rrZdulwich.filerZ
dulwich.indexrrZdulwich.reflogrr1�objectrrrrr�<module>s