관리-도구
편집 파일: loose.cpython-311.pyc
� �܋f� � �� � d dl mZmZmZ d dlmZmZ d dlmZm Z m Z mZ d dlm Z mZ d dlmZmZmZmZmZmZmZmZmZmZmZmZmZmZ d dlmZm Z m!Z!m"Z" d dl#m$Z$ d dl%Z%d dl&Z&d dl'Z'd Z( G d � deee� � Z)dS )� )� FileDBBase� ObjectDBR� ObjectDBW)� BadObject�AmbiguousObjectName)�DecompressMemMapReader�FDCompressedSha1Writer�FDStream� Sha1Writer)�OStream�OInfo)�file_contents_ro_filepath�ENOENT� hex_to_bin� bin_to_hex�exists�chmod�isdir�isfile�remove�mkdir�rename�dirname�basename�join)� chunk_size�loose_object_header_info�write_object�stream_copy)�force_bytesN)� LooseObjectDBc � � � e Zd ZdZeZ edd� � Zej dk r edd� � Z� fd�Z d� Zd� Zd � Z d � Z� fd�Zd� Zd � Zd� Zd� Zd� Zd� Z� xZS )r! z/A database which operates on loose object files�444� �nt�644c � �� t � � � |� � t � � | _ t t dd� � | _ d S )N� O_NOATIMEr )�super�__init__�dict�_hexsha_to_file�getattr�os�_fd_open_flags)�self� root_path� __class__s ��_/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/gitdb/db/loose.pyr* zLooseObjectDB.__init__M sC �� � ������#�#�#�#�v�v��� &�b�+�q�9�9����� c �B � t |dd� |dd� � � S )z{ :return: path at which the object with the given hexsha would be stored, relative to the database rootN� )r )r0 �hexshas r3 �object_pathzLooseObjectDB.object_pathV s$ � � �F�2�A�2�J��q�r�r� �+�+�+r4 c �� � | j | S # t $ r Y nw xY w| � | � |� � � � }t |� � r|| j |<