GidQfddlmZddlZddlZddlZddlZddlZddlmZddl m Z ddl m Z ddl mZmZddlmZmZmZddlmZdd lmZdd lmZmZmZdd lmZdd lmZm Z m!Z!dd l"m#Z#m$Z$m%Z%m&Z&ddl'm(Z(m)Z)m*Z*ddl+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1ddl2m3Z4ddl5m6Z6m7Z7m8Z8m9Z9m:Z:ddl;Z;ddlZ>m?Z?m@Z@mAZAmBZBmCZCddlDmEZEmFZFmGZGmHZHmIZImJZJmKZKmLZLmMZMmNZNmOZOmPZPmQZQmRZRmSZSmTZTddl=mUZUmVZVeTrddl+mWZWddlXmYZYddlmZZZddl[m\Z\ddl'm]Z]ej^e_Z`dZaGddeRZbGddecZddS)) annotationsN)Path) LooseObjectDB) BadObject)Githandle_process_output)defenc safe_decodeis_win)GitConfigParser)GitCmdObjectDB)GitCommandErrorInvalidGitRepositoryErrorNoSuchPathError IndexFile) Submodule RootModuleCommit)HEADHead Reference TagReference)Remote add_progressto_progress_instance)Actorfinalize_processcygpath hex_to_bin expand_pathremove_password_if_present) rev_parse is_git_dirfind_submodule_git_dirtouchfind_worktree_git_dir)TBDPathLikeLit_config_levels Commit_ishTree_ish assert_never)AnyBinaryIOCallableDictIteratorListMappingOptionalSequenceTextIOTupleTypeUnion NamedTuplecast TYPE_CHECKING)ConfigLevels_Tup TypedDict) IterableList)SymbolicReference)Tree)UpdateProgress)RemoteProgress)Repoc8eZdZUded<ded<ded<ded<dS) BlameEntryzDict[str, 'Commit']commitrangelinenos Optional[str] orig_path orig_linenosN__name__ __module__ __qualname____annotations__/srv/buildsys-work-dir/castor/build_node/builder-2/WGSG1/unpkd_srcs/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/git/repo/base.pyrHrHes?NNNrUrHceZdZUdZdZeddZded<dZded<ded <d Z ded <e j d Z e j d Z e j dZe j dZe j dZe j dZgdZdZded<eZdeddfdd Zdd"Zdd%Zdd&Zdd'Zdd*Zdd+Zdd-Zdd/Zdd1Z e!ee d23Z"[[ e!dd4Z#e!dd5Z$e!dd6Z%e!dd8Z&e!dd:Z'e'Z(e&Z)e!dd<Z*e!dd>Z+e!dd@Z,dddDZ-e!ddFZ.ddHZ/ddKZ0ddMZ1ddNZ2e!ddPZ3ddRZ4e5ddSZ6 ddd[Z7dd^Z8 dddbZ9dddZ:ddgZ;ddiZ dddoZ?dddqZ@ddduZAddwZBdddzZC dddZDddZEddZFdddZGddZHddZIe!eHeId3ZJ[H[IddZKddZLe!eKeLd3ZM dddZNe!ddZOddZPddZQe!ddZRddZS dddZTeUddedfddZVeU dddZW dddZXeU dddZY dddZZddZ[e\Z\ddZ]dd„Z^dS(rFa)Represents a git repository and allows you to query references, gather commit information, generate diffs, create and clone repositories query the log. The following attributes are worth using: 'working_dir' is the working directory of the git command, which is the working tree directory if available or the .git directory in case of bare repositories 'working_tree_dir' is the working tree directory, but will return None if we are a bare repository. 'git_dir' is the .git repository directory, which is always set.zgit-daemon-export-okrNr* working_dirOptional[PathLike]_working_tree_dirgit_dir _common_dirz\s+z^[0-9A-Fa-f]{40}$z^[0-9A-Fa-f]{4,40}$z5(\$(\{\s?)?[a-zA-Z_]\w*(\}\s?)?|%\s?[a-zA-Z_]\w*\s?%)z^(author|committer)z^\t(.*)$)z --upload-packz-uz--configz-c)systemuserglobal repositoryr? config_levelFTpathodbtType[LooseObjectDB]search_parent_directoriesbool expand_varsreturnNonec|ptjd}|stj}tjrt |}|p|ptj}t |tst|}|r.tj |j |rtj dt||}|.tj|st!||}d}|rWt#|r|}tj||_tjdG|d|}|ddr|dd|_dtjvrtjd|_nt1j|d } t5| } | t1j| }t5| } | t9| } | t| |}||_n |snt1j|\}} | sn|W|t=|||_d |_ |!d"dd |_ n#tF$rYnwxYw tI|jd z %&d '} t1j|j| |_(n#tR$r d|_(YnwxYw|j rd|_|jp|j*|_+|,|j+|_-t1j|j*d} t]|t^r|| |j-|_0dS|| |_0dS)a Create a new Repo instance :param path: the path to either the root git directory or the bare git repo:: repo = Repo("/Users/mtrier/Development/git-python") repo = Repo("/Users/mtrier/Development/git-python.git") repo = Repo("~/Development/git-python.git") repo = Repo("$REPOSITORIES/Development/git-python.git") repo = Repo("C:\Users\mtrier\Development\git-python\.git") - In *Cygwin*, path may be a `'cygdrive/...'` prefixed path. - If it evaluates to false, :envvar:`GIT_DIR` is used, and if this also evals to false, the current-directory is used. :param odbt: Object DataBase type - a type which is constructed by providing the directory containing the database objects, i.e. .git/objects. It will be used to access all object data :param search_parent_directories: if True, all parent directories will be searched for a valid repo as well. Please note that this was the default behaviour in older versions of GitPython, which is considered a bug though. :raise InvalidGitRepositoryError: :raise NoSuchPathError: :return: git.RepoGIT_DIRzoThe use of environment variables in paths is deprecated for security reasons and may be removed in the future!!NGIT_COMMON_DIRracoreworktree GIT_WORK_TREE.gitFbare commondirrr\objects)1osgetenvgetcwdr is_cygwinr isinstancestrresearch re_envvarswarningswarnr!rcexistsrr%dirnamerZenvironget_config_reader has_optionospjoinr&normpathr(splitrr[_bare config_reader getboolean Exceptionr read_text splitlinesstripr]OSError common_dirrXGitCommandWrapperTypegit issubclassr odb)selfrcrdrfrhepathcurpathr[gitconfdotgit sm_gitpathtailrrootpaths rV__init__z Repo.__init__sD, ),, IKKE =?? #ENNE,,%%% JJE  29T_e<<  MN   E;//  7>>%(( -%e,,,*  '"" !*,)A)A&:>>"233;"11,HHG))&*==Q18VZ1P1P."bj00-/Y-G-GD*Xgv..F/77J%,z22/77J!26:: %%j+>>)0&, Ig..MGT U* Z ?+E22 2   ++L99DDVVTTDJJ    D  "t|,,{:EEGGRRTTUVW]]__J"x jAAD   " " "!D    " : *%)D "&*%;%Nt--d.>??8DOY77 dN + + &tHdh//DHHHtH~~DHHHs%7.J&& J32J37A2L**L>=L>'Repo'c|SNrTrs rV __enter__zRepo.__enter__)s rUargsr/c.|dSr)close)rrs rV__exit__z Repo.__exit__,s rUcR |dS#t$rYdSwxYwr)rrrs rV__del__z Repo.__del__/s:  JJLLLLL    DD s  &&c|jrr|jtrtjt jjtrtjdSdSdSr)r clear_cacher gccollectgitdbutilmmanrs rVrz Repo.close5sv 8  H " " "  JO # # % % %      rUrhsobjectcPt|tr|j|jkSdS)NF)ryrFr[rrs rV__eq__z Repo.__eq__Ds( c4  /<3;. .urUc.|| Sr)rrs rV__ne__z Repo.__ne__Is;;s####rUintc*t|jSr)hashr[rs rV__hash__z Repo.__hash__LsDL!!!rUrzctj|jd}t|d5}|tcdddS#1swxYwYdS)N descriptionrb)rrr[openreadrstripdecoder )rfilenamefps rV_get_descriptionzRepo._get_descriptionPs8DL-88 (D ! ! 5R7799##%%,,V44 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5s>A66A:=A:descrctj|jd}t|d5}||dzt ddddS#1swxYwYdS)Nrwb )rrr[rwriteencoder )rrrrs rV_set_descriptionzRepo._set_descriptionUs8DL-88 (D ! ! 4R HHedl**622 3 3 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4s1A))A-0A-zthe project's description)docc|jS)zj:return: The working tree directory of our git repository. If this is a bare repository, None is returned.)rZrs rVworking_tree_dirzRepo.working_tree_dir^s %%rUc|jp|jS)z :return: The git dir that holds everything except possibly HEAD, FETCH_HEAD, ORIG_HEAD, COMMIT_EDITMSG, index, and logs/.)r]r[rs rVrzRepo.common_dircs /4</rUc|jS)z':return: True if the repository is bare)rrs rVrrz Repo.barejs zrU'IterableList[Head]'c*tj|S)zA list of ``Head`` objects representing the branch heads in this repo :return: ``git.IterableList(Head, ...)``)r list_itemsrs rVheadsz Repo.headsos t$$$rU'IterableList[Reference]'c*tj|S)zzA list of Reference objects representing tags, heads and remote references. :return: IterableList(Reference, ...))rrrs rV referenceszRepo.referencesw #D)))rU 'IndexFile'c t|S)z:return: IndexFile representing this repository's index. :note: This property can be expensive, as the returned ``IndexFile`` will be reinitialized. It's recommended to re-use the object.rrs rVindexz Repo.indexs rU'HEAD'c"t|dS)z;:return: HEAD Object pointing to the current head referencer)rrs rVheadz Repo.headsD&!!!rU'IterableList[Remote]'c*tj|S)zvA list of Remote objects allowing to access and manipulate remotes :return: ``git.IterableList(Remote, ...)``)rrrs rVremotesz Repo.remotess  &&&rUoriginname'Remote'crt||}|std|z|S)zh:return: Remote with the specified name :raise ValueError: if no remote with such a name existszRemote named '%s' didn't exist)rr ValueError)rrrs rVremotez Repo.remotes= 4  xxzz F=DEE ErU'IterableList[Submodule]'c*tj|S)zs :return: git.IterableList(Submodule, ...) of direct submodules available from the current head)rrrs rV submoduleszRepo.submodulesrrU 'Submodule'ch |j|S#t$r}td|z|d}~wwxYw)z]:return: Submodule with the given name :raise ValueError: If no such submodule existszDidn't find submodule named %rN)r IndexErrorr)rres rV submodulezRepo.submodulesN M?4( ( M M M=DEE1 L Ms  1,1kwargsrc,tj|g|Ri|S)zCreate a new submodule :note: See the documentation of Submodule.add for a description of the applicable parameters :return: created submodules)raddrrrs rVcreate_submodulezRepo.create_submodules$ }T3D333F333rUIterator[Submodule]c6t|j|i|S)zAn iterator yielding Submodule instances, see Traversable interface for a description of args and kwargs :return: Iterator)rtraversers rViter_submoduleszRepo.iter_submoduless$ )z$($9&999rUc6t|j|i|S)zUpdate the submodules, keeping the repository consistent as it will take the previous state into consideration. For more information, please see the documentation of RootModule.update)rupdaters rVsubmodule_updatezRepo.submodule_updates$'z$&7777rU'IterableList[TagReference]'c*tj|S)zsA list of ``Tag`` objects that are available in this repo :return: ``git.IterableList(TagReference, ...)``)rrrs rVtagsz Repo.tagss &t,,,rUrcL||}t||S)z:return: TagReference Object, reference pointing to a Commit or Tag :param path: path to the tag reference, i.e. 0.1.5 or tags/0.1.5)_to_full_tag_pathr)rrc full_paths rVtagzRepo.tags'**400 D),,,rUct|}|tjdzr|S|tjdzrt jdz|zStjdz|zS)N/)rz startswithr_common_path_default_common_defaultr)rcpath_strs rVrzRepo._to_full_tag_pathsut99   |@3F G G O   |;cA B B F1C7(B B4s:XE ErUrrI!Union['SymbolicReference', 'str']forcelogmsgrL'Head'c2tj|||||S)zCreate a new head within the repository. For more documentation, please see the Head.create method. :return: newly created Head Reference)rcreate)rrcrIr rs rV create_headzRepo.create_heads{4vvu===rUr'Union[str, Head]'c,tj|g|Ri|S)zfDelete the given heads :param kwargs: Additional keyword arguments to be passed to git-branch)rdelete)rrrs rV delete_headzRepo.delete_heads${42%2226222rUrefUnion[str, 'SymbolicReference']messagec .tj|||||fi|S)zCreate a new tag reference. For more documentation, please see the TagReference.create method. :return: TagReference object)rr)rrcrrr rs rV create_tagzRepo.create_tags%"4sGUMMfMMMrUrc&tj|g|RS)zDelete the given tag references)rr)rrs rV delete_tagzRepo.delete_tags"4/$////rUurlrc *tj|||fi|S)zCreate a new remote. For more information, please see the documentation of the Remote.create methods :return: Remote reference)rr)rrrrs rV create_remotezRepo.create_remotes }T477777rUrc,tj||S)zDelete the given remote.)rremove)rrs rV delete_remotezRepo.delete_remote s}T6***rUr+c ||j}tr|dkrd}|dkrdS|dkrtjdp2t jtjddd}t jt jt j|d d S|dkr&t jt jd S|d kr9|j p|}|stt jt j|d St|td |dS)Nr^r`z/etc/gitconfigr_XDG_CONFIG_HOMEHOME~z.configrconfigz ~/.gitconfigrazInvalid configuration level: ) r[r rurrrrr expanduserr]NotADirectoryErrorr.r)rrbr[ config_homerepo_dirs rV_get_config_pathzRepo._get_config_paths@ ?lG  $lh..#L 8 # ### V # #*..):;;osx W]_bHcHcen?o?oK<sx UH/U/U V VWW W X % %<~ > >?? ? \ ) )'27H B((|CHXx$@$@AAA K<KKLL     rUOptional[Lit_config_levels]r c.||S)aw :return: GitConfigParser allowing to read the full git configuration, but not to write it The configuration will include values from the system, user and repository configuration files. :param config_level: For possible values, see config_writer method If None, all applicable levels will be used. Specify a level in case you know which file you wish to read to prevent reading multiple files. :note: On windows, system configuration cannot currently be read as the path is unknown, instead the global path will be used.)rb)rrrbs rVrzRepo.config_reader-s""" "===rUc|fdjD}n|g}t|dS)Ncg|]@}tt|tt|ASrT)r=r+r-).0fr[rs rV z'Repo._config_reader..FsU)1--%%d+z"Repo.iter_trees..ks$CC1CCCCCCrU) iter_commitsrs rV iter_treeszRepo.iter_treeshs,DC 1 14 B6 B BCCCCrUUnion[Tree_ish, str, None]'Tree'cr||jjjS|t |dzS)aThe Tree object for the given treeish revision Examples:: repo.tree(repo.heads[0]) :param rev: is a revision pointing to a Treeish ( being a commit or tree ) :return: ``git.Tree`` :note: If you need a non-root level tree, find it by iterating the root tree. Otherwise it cannot know about its path relative to the repository root and subsequent operations might have unexpected results.Nz^{tree})rrIrCr$rzr?s rVrCz Repo.treems4 ;9#( (~~c#hh2333rU-Union[str, Commit, 'SymbolicReference', None]paths#Union[PathLike, Sequence[PathLike]]Iterator[Commit]c F| |jj}tj|||fi|S)aA list of Commit objects representing the history of a given ref/commit :param rev: revision specifier, see git-rev-parse for viable options. If None, the active branch will be used. :param paths: is an optional path or a list of paths; if set only commits that include the path or paths will be returned :param kwargs: Arguments to be passed to git-rev-list - common ones are max_count and skip :note: to receive only commits between two named revisions, use the "revA...revB" revision specifier :return: ``git.Commit[]``)rrIr iter_items)rr<rLrs rVrFzRepo.iter_commits~s00 ;)"C sE<#??733::;KLLSST\]]ddekll  " "8 , , , ,rUc |jj|}n%#t$r}|jdkrgcYd}~Sd}~wwxYw|dddddS)zChecks if paths are ignored via .gitignore Doing so using the "git check-ignore" method. :param paths: List of paths to check whether they are ignored or not :return: subset of those paths which are ignored r#Nz\\\rr\r)r check_ignorerrWreplacer)rrLrr[s rVignoredz Repo.ignoredes --u5DD   zQ  ||FD))11#r::@@FFFs 4 /4/4rc|jjS)zThe name of the currently active branch. :raises TypeError: If HEAD is detached :return: Head to the active branch)r referencers rV active_branchzRepo.active_branchysy""rU str | HEADfileIterator['BlameEntry']c+(K|jj|d|fdddd|}i}d|dD} t|}n#t$rYdSwxYw|}|\} } } } t | } t | }t | }| |vrVi} t|}n#t$rYdSwxYw|dkr*|d d \}}|||<|d kr|}nQt |t| tt|d t|d  d dt |dtt|dt|d d dt |d}||| <nF t|}n#t$rYdSwxYw|d d \}}|d kr|}nEt|| t| | |zt|t|||zVV)aIterator for blame information for the given file at the given revision. Unlike .blame(), this does not return the actual file's contents, only a stream of BlameEntry tuples. :param rev: revision specifier, see git-rev-parse for viable options. :return: lazy iterator of BlameEntry tuples, where the commit indicates the commit to blame for the line, and range indicates a span of line numbers in the resulting file. If you combine all line number ranges outputted by this command, you should get a continuous range spanning all line numbers in the file. rTF)p incrementalstdout_as_stringc3K|]}||V dSrrT)r3r\s rVrEz)Repo.blame_incremental..s'==4=$======rU Nsboundary r#sfilenamesauthors author-mail<>s author-times committerscommitter-mailscommitter-timeauthor authored_date committercommitted_date)rblamernext StopIterationrrr rr lstriprrHrJ)rr<rrdatacommitsstreamr\ split_linehexsha orig_lineno_blineno_b num_lines_blineno num_lines orig_linenopropsrrp orig_filenamerDs rVblame_incrementalzRepo.blame_incrementals%dhnS$q$afqqjpqq')==4::e#4#4===@  F||     J;E 8FM8[]]FK((Im,,KW$$-/#F||({**!!%D!!4!4JC!&E#Jk))(- "v&& #E)$455#E.$9$@$@$F$F$M$Md$S$STT#&eN&;"<"<##E,$788#E*;$<$C$CD$I$I$P$PQU$V$VWW$'u->'?#@#@   #$#F||(!%D!!4!4JCk))(- ffy011M**k;#:;;    w@ s5A AA1C CCH H#"H#Union[str, HEAD]rrev_optsOptional[List[str]]KList[List[Commit | List[str | bytes] | None]] | Iterator[BlameEntry] | Nonec v|r|j||fi|S|pg}|jj|g|d|Rddd|}i}g}Gddtd} i} d} || D]R} | t} |j | d}|d }d}n#t$r d }g}d}YnwxYw|j |r|d  d }t|d krd|i} |dgg| d|kr.d|i} |||gg |j |}|r|d }|dkrd|dr |d | d<e|drt'|d | d<||kr |d | d<|dkrb|dr |d | d<|drt'|d | d<||kr |d | d<|dr |d | d<3|dr |d | d<U|d kr| r| d}||}|yt+|t-|t/j| dd | d| dt/j| dd | d| d}|||<||d d <|d d@|s| r| d dkr | dd} | }n| }|d d|d|i} T|S)aThe blame information for the given file at the given revision. :param rev: revision specifier, see git-rev-parse for viable options. :return: list: [git.Commit, list: []] A list of lists associating a Commit object with a list of lines that changed within the given commit. The Commit objects will be given in order of appearance.rTF)rrcteZdZUded<ded<ded<ded<ded<ded<ded <ded <ded <ded <d S)Repo.blame..InfoTDrzraidrsummaryr author_emailr author_datercommitter_emailcommitter_dateNrOrTrUrVInfoTDrsx HHH GGG MMM LLL KKK         NNN      rUr)totalr#rr\r rNrz-mailrz-timerrrrrrr )rrrr@rrrr re_whitespacerUnicodeDecodeErrorre_hexsha_onlyr|rUrXrre_author_committer_startgroupendswithrrrr r _from_string)rr<rrrrrrblamesrrfkeepends line_bytesline_strparts firstpart is_binarydigitsmrolerarDr\s rVrz Repo.blames  ?)4)#t>>v>> >>r$dhnSj8jTj4jj4Z_jjcijj%'@B Ye //(33b /b /J "%,,..55f==*001==!!H ! & ! ! !   !")))44Q / r--v;;!## ),DMM4*----$Z9,, ),DMM7;;y#9#92">???299)DDB/771::Dx''$--g667389D00&//88725eBi..D//!Y..-22YDN,,$--g66:6;BiD!233&//88:58r^^D!122!Y..05b D-!++J77#/+09Z(("--i88!/*/)Y"b/"&t*C ' C 0 0A y$*$($.sOO+0+=h>h>hRVWeRf>h>h+i+i26}2E.3.@DDUAqAqX\]nXoAqAq.r.r378H3I %"%"%"01 ,-F2JqM &bz!}8'0!6'/%@HQK44G4G3;ABB<+3DD+5D !'r 1 4 4T : : :$(#;D  s),B;;C CUnion[PathLike, None]mkdirType[GitCmdObjectDB]c |rt||}|r+|r)tj|stj|d||}|jdi||||S)a]Initialize a git repository at the given path if specified :param path: is the full path to the repo (traditionally ends with /.git) or None in which case the repository will be created in the current working directory :param mkdir: if specified will create the repository directory if it doesn't already exists. Creates the directory with a mode=0755. Only effective if a path is explicitly given :param odbt: Object DataBase type - a type which is constructed by providing the directory containing the database objects, i.e. .git/objects. It will be used to access all object data :param expand_vars: if specified, environment variables will not be escaped. This can lead to information disclosure, allowing attackers to access the contents of environment variables :param kwargs: keyword arguments serving as additional options to the git-init command :return: ``git.Repo`` (the newly created repo)irdrT)r!rrrumakedirsrinit)clsrcrrdrhrrs rVrz Repo.initfsF  2t[11D  %T %#*T"2"2 % Ke $ $ $''--6s4d####rUr'Git'odb_default_typeprogressPUnion['RemoteProgress', 'UpdateProgress', Callable[..., 'RemoteProgress'], None] multi_optionsallow_unsafe_protocolsallow_unsafe_optionsc | d|} t|tst|}tjrd| vrtj|n|} | d} | rtj| | d<d} |r'tjd |} |s!tj t||s:tj t| |j|s|rtj ||j|j| dtjt|| fdddddt!| ||}|r9t#|dt%|t(d nd|\}}t-|d d }t/|}t0d ||t)||t5j|s#|jt5j |j|n|}||| }|jjdi||j rb|j dj!5}|"dtj|j dj#dddn #1swxYwY|S)Nrdrrseparate_git_dirr)optionsunsafe_optionsrT)with_extended_outputrvuniversal_newlinesF)decode_streamsrr\zCmd(%s)'s unused stdout: %s)stderrrrrrT)$popryrzrrx polish_urlrshlexrrcheck_unsafe_protocolscheck_unsafe_optionslistkeysunsafe_git_clone_optionsclonerrrnew_message_handlerr communicategetattrr"rhririsabs _working_dirrupdate_environment environmentrr; set_valuer)rrrrcrrrrrrrd clone_pathsep_dirmultirrrcmdliner8writers rV_clonez Repo._clones[zz&"233$$$ t99D.1]__[6AQAQS^D)))W[ **/00  A),)@)@F% &  9K 7 788E% 1  &s3xx 0 0 0# o  $T&++---@-@QTQm n n n n# i  i  $]3Kg h h h hsy   N3s88 $ $   "&#   6311     2 !$X..BBDD $       $//11 VVdFB//G099G II3Wf E E E T& 1 1 1 1y ^7:7G7S38C,d333Y]Ds4d### $#88coo&7&7888 < Ma. M&  t|A7J(K(KLLL M M M M M M M M M M M M M M M s#9K((K,/K,Optional[Callable]c f|j|j|j|t|j||f||d|S)aCreate a clone from this repository. :param path: is the full path of the new repo (traditionally ends with ./.git). :param progress: See 'git.remote.Remote.push'. :param multi_options: A list of Clone options that can be provided multiple times. One option per list item which is passed exactly as specified to clone. For example ['--config core.filemode=false', '--config core.ignorecase', '--recurse-submodule=repo1_path', '--recurse-submodule=repo2_path'] :param allow_unsafe_protocols: Allow unsafe protocols to be used, like ext :param allow_unsafe_options: Allow unsafe options to be used, like --upload-pack :param kwargs: * odbt = ObjectDatabase Type, allowing to determine the object database implementation used by the returned Repo instance * All remaining keyword arguments are given to the git-clone command :return: ``git.Repo`` (the newly cloned repo)rr)rrrrgr)rrcrrrrrs rVrz Repo.clonesT2t{ H O  NN    $:!5      rUto_pathenvOptional[Mapping[str, str]]c |tj} | | jdi||j| ||t ||f||d|S)aCreate a clone from the given URL :param url: valid git url, see http://www.kernel.org/pub/software/scm/git/docs/git-clone.html#URLS :param to_path: Path to which the repository should be cloned to :param progress: See 'git.remote.Remote.push'. :param env: Optional dictionary containing the desired environment variables. Note: Provided variables will be used to update the execution environment for `git`. If some variable is not specified in `env` and is defined in `os.environ`, value from `os.environ` will be used. If you want to unset some variable, consider providing empty string as its value. :param multi_options: See ``clone`` method :param allow_unsafe_protocols: Allow unsafe protocols to be used, like ext :param allow_unsafe_options: Allow unsafe options to be used, like --upload-pack :param kwargs: see the ``clone`` method :return: Repo instance pointing to the cloned directoryNrrT)rrurwrrr ) rrrrrrrrrrs rV clone_fromzRepo.clone_froms8'' 44 ? "C " ) )S ) ) )sz        $:!5      rUostreamUnion[TextIO, BinaryIO]treeishrc d| |jj}|r d|vr||d<||d<|dg}ttt t t tt dff|}t|ttfs|g}|j j d|g|Ri||S)a-Archive the tree at the given revision. :param ostream: file compatible stream object to which the archive will be written as bytes :param treeish: is the treeish name/id, defaults to active branch :param prefix: is the optional prefix to prepend to each filename in the archive :param kwargs: Additional arguments passed to git-archive * Use the 'format' argument to define the kind of format. Use specialized ostreams to write any format supported by python. * You may specify the special **path** keyword, which may either be a repository-relative path to a directory or file to place into the archive, or a list or tuple of multiple paths. :raise GitCommandError: in case something went wrong :return: selfNr output_streamrc.r) rrIrr=r;r*r4r9rytuplerrarchive)rrrrrrcs rVrz Repo.archive;s* ?i&G  &hf,,%F8 ")zz&"%%E(DNE(C-4HHI4PP$ .. 6Dw8888888 rUc~|jrdS|jr,tjtj|jdSdS)a :return: True if our git_dir is not at the root of our working_tree_dir, but a .git file with a platform agnositic symbolic link. Our git_dir will be wherever the .git file points to :note: bare repositories will always return False here Frq)rrrrr|rrs rVhas_separate_working_treezRepo.has_separate_working_tree]sB 9 5   :cht') __class__rQrPr[)rclazzs rV__repr__z Repo.__repr__ls-$///NNrU Commit | Nonec6|jrtj|jd}tj|sdSt |d5}|}dddn #1swxYwY||S)z :return: The commit which is currently being replayed while rebasing. None if we are not currently rebasing. REBASE_HEADNrt)r[rrr|rreadlinerrI)rrebase_head_filer4contents rVcurrently_rebasing_onzRepo.currently_rebasing_onps < E"x mDD z*++ 4 "D ) ) +Qjjll((**G + + + + + + + + + + + + + + +{{7###s'A;;A?A?) rcrYrdrerfrgrhrgrirj)rir)rr/rirj)rirj)rrrirg)rir)rirz)rrzrirj)rirY)rir*)rirg)rir)rir)rir)rir)rir)r)rrzrir)rir)rrzrir)rr/rr/rir)rr/rr/rir)rir)rcr*rir)rcr*rirz)rFN) rcr*rIr r rgrrLrir)rrrr/rirj)rNF) rcr*rrrrLr rgrr/rir)rrrirj)rrzrrzrr/rir)rrrirzr)rbr+r[rYrirz)rbr.rir )NN)rbr.r[rYrir )ra)rbr+rir )r<r=rir)rr/rr/rir@)r<rHrirI)Nr\)r<rKrLrMrr/rirN)r<r)rr/rirQ)r]r^r<r^rirg)rarzrbrcrirg)rprrirj)riru)ryrurirj)TTFTN) rrgr~rgrrgrrgrcrYrirg)rr/rr/riru)rLr*riru)rir)r<rrrzrr/rir)FN) r<rrrzrrgrrrr/rir) rcrrrgrdrrhrgrr/rir)NNFF)rrrr*rcr*rrrrrrrrgrrgrr/rir)rcr*rrrrrrgrrgrr/rir)NNNFF)rr*rr*rrrrrrrrgrrgrr/rir) rrrrLrrLrr/rirF)rir))_rPrQrR__doc__rnr=rrSrZr]r{compilerrre_hexsha_shortenedr}rre_tab_full_linerrbrrr rrrrrrrrrrpropertyrrrrrrrrefsbranchesrrrrrrrrrrr staticmethodrrrrrr r#r-rrr;rIrGrCrFrVr`rlrort daemon_exportrzr}rwrrrrrrr classmethodrrrrrr!r$r(r0rTrUrVrFrFlsq H H0 $ud  C,00000KBJv&&MRZ 344N$"*%:;;TUUJ * +A B B!rz+..   &PLOOOO $($2*/ H&H&H&H&H&T     $$$$""""5555 4444 (+-=C^___K &&&X&000X0 X%%%X%***X* DH X """X"'''X' ***X* MMMM4444::::8888---X- ---- FFF\F5; $ > > > > >333306!% N N N N N00008888++++<59>>>>>*59&* A A A A A ` ` ` ` `/////DDDD 44444&>B57=====:>    ($$$$     H <M     8888& ^J! %#' &&&&&P + + +X +(GGGG(###X#SSSSr"(, MMMMM^'+%3 *$*$*$*$[*$Xfj-1',%*UUUU[Ut(,-1',%* # # # # # J (,+/-1',%*( ( ( ( [( Z"& $     D    IOOOO $ $ $ $ $ $rUrF)e __future__rloggingrur{rr~pathlibrgitdb.db.looser gitdb.excrgit.cmdrr git.compatr r r git.configr git.dbr git.excrrr git.indexr git.objectsrrrgit.refsrrrr git.remoterrrgit.utilrrrr r!r"os.pathrcrfunr$r%r&r'r(rr git.typesr)r*r+r,r-r.typingr/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rAgit.refs.symbolicrBrCgit.objects.submodule.baserDrE getLoggerrPrh__all__rHrrFrTrUrVrRsQ #""""" ((((((........ '&&&&&!!!!!!  5555555555888888888888AAAAAAAAAA &21111111*%%%%%%333333      999999))))))g!! P$P$P$P$P$6P$P$P$P$P$rU