File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/git/objects/submodule/__pycache__/util.cpython-310.pyc
Back
o ;j� � @ s g d �Z ddlmZ ddlZddlZddlmZ ddlmZ ddl m Z mZmZm Z ddlmZ erRddlmZ dd lmZmZ dd lmZ ddlmZ dd lmZ dedefdd�Zdedefdd�Zdddeddfdd�Zded deddfdd �ZG d!d"� d"e�ZdS )#)� sm_section�sm_name�mkhead�find_first_remote_branch�SubmoduleConfigParser� )�BytesION)�GitConfigParser)�InvalidGitRepositoryError)�Any�Sequence� TYPE_CHECKING�Union)�PathLike)� ReferenceType)�Head�RemoteReference)�Remote)�Repo� )� Submodule�name�returnc C s d| � d�S )zA:return: Section title used in ``.gitmodules`` configuration filezsubmodule "�"� )r r r �N/opt/saltstack/salt/lib/python3.10/site-packages/git/objects/submodule/util.pyr % s r �sectionc C s | � � } | dd� S )z>:return: Name of the submodule as parsed from the section name� ���)�strip)r r r r r * s r �repor �pathr c C s t �| t j�|��S )z!:return: New branch/head instance)�gitr Zto_full_path)r r r r r r 0 s r �remotesr �branch_namer c C s8 | D ]}z|j | W S ty Y qw td| ��)ztFind the remote branch matching the name of the given branch or raise :exc:`~git.exc.InvalidGitRepositoryError`.z:Didn't find remote branch '%r' in any of the given remotes)Zrefs� IndexErrorr )r"