HEX
Server: LiteSpeed
System: Linux s787.bom1.mysecurecloudhost.com 4.18.0-477.13.1.lve.el8.x86_64 #1 SMP Thu Jun 1 16:40:47 EDT 2023 x86_64
User: mobilech (5348)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/gitdb/db/__pycache__/git.cpython-310.pyc
o

;jj
�@shddlmZmZmZddlmZddlmZddlm	Z	ddl
mZddlZdZ
Gdd	�d	eee�ZdS)
�)�
CompoundDB�	ObjectDBW�
FileDBBase)�
LooseObjectDB)�PackedDB)�ReferenceDB)�
InvalidDBRootN)�GitDBcsfeZdZdZeZeZeZ	dZ
dZej
�dd�Z�fdd�Z�fdd	�Zd
d�Zdd
�Zdd�Z�ZS)r	aA git-style object database, which contains all objects in the 'objects'
    subdirectory

    ``IMPORTANT``: The usage of this implementation is highly discouraged as it fails to release file-handles.
    This can be a problem with long-running processes and/or big repositories.
    �pack��infoZ
alternatescst��|�dS)z/Initialize ourselves on a git objects directoryN)�super�__init__)�self�	root_path��	__class__��@/opt/saltstack/salt/lib/python3.10/site-packages/gitdb/db/git.pyr(szGitDB.__init__cs�|dks|dkr\t�|_d}|j|jf|j|jf|j|jffD]!\}}|�|�}t	j
�|�r@|j�||��||jur@|jd}q|jsJt
|����|durSt|d�sWJd��||_dSt��|�dS)N�_dbs�	_loose_db����storez(First database needs store functionality)�listr�	packs_dir�	PackDBCls�	loose_dir�
LooseDBCls�alternates_dir�ReferenceDBClsZdb_path�os�path�exists�appendrr�hasattrrr
�_set_cache_)r�attrZloose_dbZsubpathZdbclsr!rrrr%,s$


�


�
zGitDB._set_cache_cC�|j�|�S�N)rr)rZistreamrrrrL�zGitDB.storecCs
|j��Sr()r�ostream)rrrrr*Os
z
GitDB.ostreamcCr'r()r�set_ostream)rr*rrrr+Rr)zGitDB.set_ostream)�__name__�
__module__�__qualname__�__doc__rrrrrrrrr r!�joinrrr%rr*r+�
__classcell__rrrrr	s r	)Z
gitdb.db.baserrrZgitdb.db.looserZ
gitdb.db.packrZgitdb.db.refrZ	gitdb.excrr �__all__r	rrrr�<module>s