x2v.#<ddlmZmZddlmZmZddlmZmZm Z m Z m Z m Z ddl mZmZmZe rddlmZdgZded efd ed effd ZGd deeeZd S)) LazyMixin IterableObj)SymbolicReference T_References)AnyCallableIteratorTypeUnion TYPE_CHECKING) Commit_ishPathLike_T)Repo Referencefunc.returncVdtdtdtffd }j|_|S)zOA decorator raising a TypeError if we are not a valid remote, based on the pathselfargsrcl|std|jz|g|RS)Nz1ref path does not point to a remote reference: %s) is_remote ValueErrorpath)rrrs /srv/buildsys-work-dir/castor/build_node/builder-2/WGSG1/unpkd_srcs/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/git/refs/reference.pywrapperz(require_remote_ref_path..wrappersF~~ ^PSWS\\]] ]tD 4    )rrr__name__)rrs` rrequire_remote_ref_pathr sG!l!3!2!!!!!! }G Nrc`eZdZdZdZdZdZdZdddded e d d ffd Z d e fd Z dde ede fde e d fd dffd Zed e fdZe ddeeddde ed fdeded eef dZeed e fdZeed e fdZxZS)rzRepresents a named reference to any object. Subclasses may apply restrictions though, i.e. Heads can only point to commits.FTrefsreporr check_pathrNc|rIt||jdzstd|jjd||t t|||dS)abInitialize this instance :param repo: Our parent repository :param path: Path relative to the .git/ directory pointing to the ref in question, i.e. refs/heads/master :param check_path: if False, you can provide any path. Otherwise the path must start with the default path prefix of this type./zCannot instantiate z from path N) str startswith_common_path_defaultr __class__rsuperr__init__)rr$rr%r+s rr-zReference.__init__2s  ac$ii2243Ls3RSS a_4>3J__Y]__`` `  i''d33333rc|jSN)name)rs r__str__zReference.__str__@s yrobjectrlogmsgcd}|*|jj}|js|j|kr |jj}t t|||| |jj |||S)z[Special version which checks if the head-log needs an update as well :return: selfN) r$head is_detachedrefcommitbinshar,r set_object log_append)rr2r3 oldbinshar5r+s rr:zReference.set_objectFs  9>D# /D(8(8 K.  i))&&999   IN % %i 8 8 8 rc|jd}t|dkr|jSd|ddS)zK:return: (shortest) Name of this reference - it may contain path componentsr'N)rsplitlenjoinrtokenss rr0zReference.namelsH %% v;;??9 xxqrr ###rcls common_pathrkwargsc.|||S)zdEquivalent to SymbolicReference.iter_items, but will return non-detached references as well.) _iter_items)rEr$rFrrGs r iter_itemszReference.iter_itemsvst[111rcF|jd}|dS)z :return: Name of the remote we are a reference of, such as 'origin' for a reference named 'origin/master'r'r?)rr@rCs r remote_namezReference.remote_names!%%ayrcp|jd}d|ddS)z:return: Name of the remote head itself, i.e. master. :note: The returned name is usually not qualified enough to uniquely identify a branchr'r>N)rr@rBrCs r remote_headzReference.remote_heads1 %%xxqrr ###r)Tr/)r __module__ __qualname____doc__ __slots___points_to_commits_only_resolve_ref_on_creater*rboolr-r(r1r rr:propertyr0 classmethodr rrr rJr rLrN __classcell__)r+s@rrr(s--I#!! 4 4V 48 4 4QU 4 4 4 4 4 4$(""j"5s:;"c4i "  """"""L$c$$$X$.2 2 2 ,  2 28T>* 2 2  2 ,  2 2 2[ 2SX$S$$$X$$$$$rN)git.utilrrsymbolicrrtypingrr r r r r git.typesrrrgit.repor__all__r rr"rrr_s265555555 GFFFFFFFFFFFFFFF.......... - (37"3 b8I     p$p$p$p$p$!9kp$p$p$p$p$r