Submit
Path:
~
/
/
opt
/
cloudlinux
/
venv
/
lib64
/
python3.11
/
site-packages
/
gitdb
/
db
/
__pycache__
/
File Content:
git.cpython-311.opt-1.pyc
� � hp � �v � d dl mZmZmZ d dlmZ d dlmZ d dlm Z d dl mZ d dlZdZ G d� d eee� � ZdS ) � )� CompoundDB� ObjectDBW� FileDBBase)� LooseObjectDB)�PackedDB)�ReferenceDB)� InvalidDBRootN)�GitDBc � � � e Zd ZdZeZeZeZ dZ dZej � dd� � Z� fd�Z� fd�Zd� Zd � Zd � Z� xZS )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� �info� alternatesc �J �� t � � � |� � dS )z/Initialize ourselves on a git objects directoryN)�super�__init__)�self� root_path� __class__s ��A/opt/cloudlinux/venv/lib/python3.11/site-packages/gitdb/db/git.pyr zGitDB.__init__( s! �� � ������#�#�#�#�#� c �& �� |dk s|dk r�t � � | _ d }| j | j f| j | j f| j | j ffD ]r\ }}| � |� � }t j � |� � r9| j � ||� � � � || j u r | j d }�s| j s!t | � � � � � �|| _ d S t! � � � |� � d S )N�_dbs� _loose_db���)�listr � packs_dir� PackDBCls� loose_dir� LooseDBCls�alternates_dir�ReferenceDBCls�db_path�os�path�exists�appendr r r r �_set_cache_)r �attr�loose_db�subpath�dbclsr% r s �r r( zGitDB._set_cache_, s �� ��6�>�>�T�[�0�0����D�I��H�$(�N�D�N�#C�$(�N�D�O�#D�$(�$7��9L�#M�#O� 1� 1���� �|�|�G�,�,���7�>�>�$�'�'� 1��I�$�$�U�U�4�[�[�1�1�1����/�/�#'�9�R�=��� �9� 6�#�D�N�N�$4�$4�5�5�5� &�D�N�N�N��G�G����%�%�%�%�%r c �6 � | j � |� � S �N)r �store)r �istreams r r/ zGitDB.storeL s � ��~�#�#�G�,�,�,r c �4 � | j � � � S r. )r �ostream)r s r r2 z GitDB.ostreamO s � ��~�%�%�'�'�'r c �6 � | j � |� � S r. )r �set_ostream)r r2 s r r4 zGitDB.set_ostreamR s � ��~�)�)�'�2�2�2r )�__name__� __module__�__qualname__�__doc__r r r r r r"