File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/gitdb/db/__pycache__/git.cpython-310.pyc
Back
o ;jj � @ sh d dl mZmZmZ d dlmZ d dlmZ d dlm Z d dl mZ d dlZdZ G dd � d eee�ZdS ) � )� CompoundDB� ObjectDBW� FileDBBase)� LooseObjectDB)�PackedDB)�ReferenceDB)� InvalidDBRootN)�GitDBc sf e Zd ZdZeZeZeZ dZ dZej �dd�Z� fdd�Z� fdd �Zd d� Zdd � Zdd� Z� ZS )r a A 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 alternatesc s t � �|� 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 ( s zGitDB.__init__c s� |dks|dkr\t � | _d }| j| jf| j| jf| j| jffD ]!\}}| �|�}t j �|�r@| j�||�� || ju r@| jd }q| jsJt | �� ��|d urSt|d�sWJ d��|| _d S t� �|� d S )N�_dbs� _loose_db����storez(First database needs store functionality)�listr � packs_dir� PackDBCls� loose_dir� LooseDBCls�alternates_dir�ReferenceDBClsZdb_path�os�path�exists�appendr r �hasattrr r �_set_cache_)r �attrZloose_dbZsubpathZdbclsr! r r r r% , s$ � � zGitDB._set_cache_c C � | j �|�S �N)r r )r Zistreamr r r r L � zGitDB.storec C s | j �� S r( )r �ostream)r r r r r* O s z GitDB.ostreamc C r'