ó
    ‘óýjê¶ ã            
       óN  • S r / SQrSSKrSSKrSSKrSSKrSSKrSSKrSSKrSSK	J
r
JrJrJrJrJr  SSKJr  SSKJr  SSKJrJrJrJr  \R2                  S:¼  a  SS	KJr  OSS	KJr  \(       aV  S
SKJrJrJr  S
SK J!r!J"r"J#r#J$r$  S
SK%J&r&  S
SK'J(r(J)r)  S
SK*J+r+  S
SK,J-r-  S
SK.J/r/  S
SK0J1r1J2r2  S
SK3J4r4  S
SK5J6r6  S
SK7J8r8  S
SK9J:r:  S
SK;J<r<J=r=  S
SK>J?r?J@r@JArAJBrBJCrCJDrDJErE  S
SKFJGrGJHrHJIrIJJrJJKrKJLrL  S
SKMJNrNJOrOJPrPJQrQJRrRJSrSJTrT  S
SK0JUrUJVrVJWrWJXrXJYrYJZrZJ[r[  S
SK\J]r]J^r^J_r_J`r`JaraJbrbJcrcJdrdJere  S
SK3Jfrf  S
SKgJhrhJiriJjrjJkrkJlrlJmrmJnrnJoroJprpJqrqJrrrJsrs  \Rè                  " \u5      rv\<" \uSS S!S"S#S$S%.5      rwS&rxS'ryS(rz\" S)S*S+9r{S,r|S-r}S.r~S/rS0r€S1r�S2r‚S3/\|/\|\}/\|\~/S4/S5//rƒS6r„ " S7 S8\…5      r† " S9 S:\…5      r‡SeS;\\ˆ\ˆ4   S-  S<\‰\ˆ\ˆ4   4S= jjrŠSeS>S?S@\ˆS-  S<\‹4SA jjrŒSB\‹S<S4SC jr�\‹" \Ž" SD5      5      SE-   r�SF\‹S<\‹4SG jr�SH\‹SI\‹S<\‹4SJ jr‘SK\\‹   S<\’\_\“\_   4   4SL jr”SK\\_\\_   4   S<\‹4SM jr•SN\ˆS<S4SO jr–SF\ˆ\‹-  \—-  S<SP4SQ jr˜SfSS jr™ " ST SU5      rš " SV SW5      r›SX\S<\ˆ4SY jrœ " SZ S[\…5      r� " S\ S]\…5      rž " S^ S_\…5      rŸ " S` Sa5      r  " Sb SR\›5      r¡ " Sc Sd\›5      r¢g)gz�Repository access.

This module contains the base class for git repositories
(BaseRepo) and an implementation which uses a repository on
local disk (Repo).

)ÚBASE_DIRECTORIESÚ	COMMONDIRÚ
CONTROLDIRÚDEFAULT_BRANCHÚDEFAULT_OFS_DELTAÚGITDIRÚINDEX_FILENAMEÚ	OBJECTDIRÚREFSDIRÚREFSDIR_HEADSÚREFSDIR_TAGSÚ	WORKTREESÚBaseRepoÚDefaultIdentityNotFoundÚInvalidUserIdentityÚInvalidWorktreeConfigurationÚ
MemoryRepoÚParentsProviderÚRepoÚUnsupportedExtensionÚUnsupportedVersionÚcheck_user_identityÚget_user_identityÚparse_graftpointsÚparse_shared_repositoryÚread_gitfileÚsanitize_user_identityÚserialize_graftpointsé    N)ÚCallableÚ	GeneratorÚIterableÚIteratorÚMappingÚSequence)ÚBytesIO)ÚTracebackType)ÚTYPE_CHECKINGÚAnyÚBinaryIOÚTypeVar)é   é   )ÚSelfé   )ÚAttributeValueÚGitAttributesÚPattern)ÚConditionMatcherÚConfigÚ
ConfigFileÚStackedConfig)ÚRenameDetector)ÚFilterBlobNormalizerÚFilterContext)ÚIndex©ÚNotes)ÚObjectFormat)ÚBaseObjectStoreÚGraphWalker)ÚUnpackedObject)ÚRebaseStateManager)ÚWalker©ÚWorkTree)Ú_deprecated_aliasesÚreflog)ÚNoIndexPresentÚNotBlobErrorÚNotCommitErrorÚNotGitRepositoryÚNotTagErrorÚNotTreeErrorÚRefFormatError)ÚPERM_EVERYBODYÚ
PERM_GROUPÚGitFileÚ
SharedPermÚadjust_shared_permÚopen_nofollow_read)ÚCommitMsgShellHookÚHookÚPostCommitShellHookÚPostReceiveShellHookÚPreCommitShellHookÚPreReceiveShellHookÚUpdateShellHook)ÚDiskObjectStoreÚMemoryObjectStoreÚMissingObjectFinderÚObjectStoreGraphWalkerÚPackBasedObjectStoreÚPackCapableObjectStoreÚfind_shallow)	ÚBlobÚCommitÚObjectIDÚRawObjectIDÚShaFileÚTagÚTreeÚcheck_hexshaÚvalid_hexsha)Úgenerate_unpacked_objects)ÚHEADREFÚDictRefsContainerÚDiskRefsContainerÚRefÚRefsContainerÚ_set_branch_trackingÚ_set_default_branchÚ	_set_headÚ_set_origin_headÚextract_branch_nameÚis_per_worktree_refÚlocal_branch_namezdulwich.refs.LOCAL_TAG_PREFIXzdulwich.refs.SYMREFzdulwich.refs.check_ref_formatzdulwich.refs.read_packed_refsz)dulwich.refs.read_packed_refs_with_peeledzdulwich.refs.write_packed_refs)ÚLOCAL_TAG_PREFIXÚSYMREFÚcheck_ref_formatÚread_packed_refsÚread_packed_refs_with_peeledÚwrite_packed_refsz.gitÚobjectsTÚTre   )ÚboundÚrefsÚtagsÚheadsÚindexÚ	commondirÚgitdirÚ	worktreesÚbranchesÚhooksÚinfos   masterc                   ó*   • \ rS rSrSrS\SS4S jrSrg)r   éÎ   z2User identity is not of the format 'user <email>'.ÚidentityÚreturnNc                 ó   • Xl         g)z)Initialize InvalidUserIdentity exception.N©rŒ   )ÚselfrŒ   s     Ú7/usr/local/lib/python3.13/site-packages/dulwich/repo.pyÚ__init__ÚInvalidUserIdentity.__init__Ñ   s   € à �ó    r�   ©Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ústrr’   Ú__static_attributes__© r”   r‘   r   r   Î   s   † Ù<ð! ð !¨÷ !r”   r   c                   ó   • \ rS rSrSrSrg)r   éÖ   z)Default identity could not be determined.r�   N©r–   r—   r˜   r™   rš   rœ   r�   r”   r‘   r   r   Ö   s   † Ü3r”   r   Úenvr�   c                 ó<  • SS K nU c  [        R                  n S H  nU R                  U5      nU(       d  M    O   S n SS Kn UR                  [        R                  " 5       5      n[        USS 5      (       a  UR                  R                  S5      S   nOS nUc  UR                  nU(       d  Uc  [        S5      eUnU R                  S5      nUc#  Uc  [        S5      eU SUR                  5        3nXg4$ ! [         a    S n N_f = f! [         a    S n Nqf = f)Nr   )ÚLOGNAMEÚUSERÚLNAMEÚUSERNAMEÚgecosÚ,zno username foundÚEMAILÚ@)ÚsocketÚosÚenvironÚgetÚpwdÚgetpwuidÚgetuidÚgetattrÚpw_gecosÚsplitÚpw_nameÚKeyErrorÚImportErrorr   Úgethostname)r¡   r«   ÚnameÚusernamer¯   ÚentryÚfullnameÚemails           r‘   Ú_get_default_identityr¾   Û   s%  € Ûà
�{Ü�j‰jˆã8ˆØ—7‘7˜4“=ˆßˆ8Ùñ 9ð
 ˆð)Ûð
	)Ø—L‘L¤§¢£Ó-ˆEô �u˜g t×,Ñ,Ø Ÿ>™>×/Ñ/°Ó4°QÑ7‘à�ØÑØ Ÿ=™=�ÞØÑÜ)Ð*=Ó>Ð>ØˆØ�G‰G�GÓ€EØ�}ØÑÜ)Ð*=Ó>Ð>Ø�*˜A˜f×0Ñ0Ó2Ð3Ð4ˆØÐÐøô% ó 	ØŠHð	ûô ó ØŠðús#   ¾D Á$C: Ã:D	ÄD	ÄDÄDÚconfigr3   Úkindc                 ó|  • SnSnU(       ar  [         R                  R                  SU-   S-   5      nUb  UR                  S5      n[         R                  R                  SU-   S-   5      nUb  UR                  S5      nUc   U R                  SS5      nUc   U R                  SS5      n[        5       u  pgUc  UR                  S5      nUc  UR                  S5      nUR                  S	5      (       a  UR                  S
5      (       a  USS nUS-   U-   S
-   $ ! [         a    Sn N”f = f! [         a    Sn N�f = f)aT  Determine the identity to use for new commits.

If kind is set, this first checks
GIT_${KIND}_NAME and GIT_${KIND}_EMAIL.

If those variables are not set, then it will fall back
to reading the user.name and user.email settings from
the specified configuration.

If that also fails, then it will fall back to using
the current users' identity as obtained from the host
system (e.g. the gecos field, $EMAIL, $USER@$(hostname -f).

Args:
  config: Configuration stack to read from
  kind: Optional kind to return identity for,
    usually either "AUTHOR" or "COMMITTER".

Returns:
  A user identity
NÚGIT_Ú_NAMEúutf-8Ú_EMAIL)Úuserr¹   r½   ó   <ó   >r.   éÿÿÿÿó    <)r¬   r­   r®   Úencoder¶   r¾   Ú
startswithÚendswith)r¿   rÀ   rÆ   r½   Úuser_ucÚemail_ucÚdefault_userÚdefault_emails           r‘   r   r     sE  € ð, €DØ€EÞÜ—*‘*—.‘. ¨$¡°Ñ!8Ó9ˆØÑØ—>‘> 'Ó*ˆDÜ—:‘:—>‘> &¨4¡-°(Ñ":Ó;ˆØÑØ—O‘O GÓ,ˆEØ�|ð	Ø—:‘:˜i¨Ó0ˆDð �}ð	Ø—J‘J˜y¨'Ó2ˆEô #8Ó"9Ñ€LØ�|Ø×"Ñ" 7Ó+ˆØ�}Ø×$Ñ$ WÓ-ˆØ×Ñ˜×Ñ %§.¡.°×"6Ñ"6Ø�a˜�ˆØ�%‰<˜%Ñ $Ñ&Ð&øô ó 	ØŠDð	ûô
 ó 	ØŠEð	ús$   ÂD ÂD, ÄD)Ä(D)Ä,D;Ä:D;rŒ   c                 ó  •  U R                  SS5      u  pSU;  a  [        U R                  SS5      5      eSU ;   d  SU ;   a  [        U R                  SS5      5      eg! [         a!  n[        U R                  SS5      5      UeSnAff = f)	zŸVerify that a user identity is formatted correctly.

Args:
  identity: User identity bytestring
Raises:
  InvalidUserIdentity: Raised when identity is invalid
rÊ   r.   rÄ   ÚreplaceNrÈ   ó    ó   
)r´   Ú
ValueErrorr   Údecode)rŒ   Ú_fstÚsndÚexcs       r‘   r   r   7  s�   € ðPØ—N‘N 5¨!Ó,‰	ˆð �3ƒÜ! (§/¡/°'¸9Ó"EÓFÐFØ�Ó˜E XÓ-Ü! (§/¡/°'¸9Ó"EÓFÐFð .øô	 ó PÜ! (§/¡/°'¸9Ó"EÓFÈCÐOûðPús   ‚A Á
B
Á)BÂB
é!   s   ,:;<>"\'Úvaluec                 óL   • U R                  [        5      R                  SS5      $ )zðStrip characters using git's ``strbuf_addstr_without_crud`` rules.

Leading and trailing "crud" (bytes <= 32 as well as ``,:;<>"\'``) is
stripped, and the delimiter characters ``\n``, ``<`` and ``>`` are
dropped from the rest of the value.
Ns    
<>)ÚstripÚ_IDENTITY_CRUDÚ	translate)rÜ   s    r‘   Ú_strip_identity_crudrá   L  s    € ð �;‰;”~Ó&×0Ñ0°°yÓAÐAr”   r¹   r½   c                 ó<   • [        U 5      S-   [        U5      -   S-   $ )a†  Build a user identity with a sanitized name and email.

Matches git's ``fmt_ident`` behavior: the name and the email are each
stripped of leading and trailing "crud" (bytes <= 32 as well as
``,:;<>"\'``), and the delimiter characters ``\n``, ``<`` and ``>``
are dropped from the middle.

Unlike ``check_user_identity``, this function never rejects its input. It
is intended for identities outside the caller's control, such as those
used by an importer to build commits. The result always passes
``check_user_identity``.

Args:
  name: User name bytestring
  email: Email bytestring

Returns:
  Identity bytestring of the format ``name <email>``
rÊ   rÈ   )rá   )r¹   r½   s     r‘   r   r   X  s$   € ô(   Ó%¨Ñ-Ô0DÀUÓ0KÑKÈdÑRÐRr”   Úgraftpointsc                 ó  • 0 nU  H}  nUR                  SS5      n[        US   5      n[        U5      S:X  a-  US   R                  5        Vs/ s H  n[        U5      PM     nnO/ nU/UQ H  n[        US5        M     XaU'   M     U$ s  snf )a  Convert a list of graftpoints into a dict.

Args:
  graftpoints: Iterator of graftpoint lines

Each line is formatted as:
    <commit sha1> <parent sha1> [<parent sha1>]*

Resulting dictionary is:
    <commit sha1>: [<parent sha1>*]

https://git.wiki.kernel.org/index.php/GraftPoint
Nr.   r   é   úInvalid graftpoint)r´   rc   Úlenrh   )rã   ÚgraftsÚlineÚ	raw_graftÚcommitÚpÚparentsÚshas           r‘   r   r   o  sž   € ð  .0€FÛˆØ—J‘J˜t QÓ'ˆ	ä˜) A™,Ó'ˆÜˆy‹>˜QÓØ,5°a©L×,>Ñ,>Ô,@ÓAÒ,@ q”x –{Ñ,@ˆGÐAˆGàˆGàÐ%˜WÓ%ˆCÜ˜Ð2Ö3ñ &ð !ˆv‹ñ ð €Mùò Bs   ÁBc                 óÚ   • / nU R                  5        HE  u  p#U(       a(  UR                  US-   SR                  U5      -   5        M4  UR                  U5        MG     SR                  U5      $ )zêConvert a dictionary of grafts into string.

The graft dictionary is:
    <commit sha1>: [<parent sha1>*]

Each line is formatted as:
    <commit sha1> <parent sha1> [<parent sha1>]*

https://git.wiki.kernel.org/index.php/GraftPoint

ó    rÕ   )ÚitemsÚappendÚjoin)rã   Úgraft_linesrë   rí   s       r‘   r   r   �  s`   € ð €KØ&×,Ñ,Ö.‰ˆÞØ×Ñ˜v¨™}¨t¯y©y¸Ó/AÑAÖBà×Ñ˜vÖ&ñ	 /ð
 �:‰:�kÓ"Ð"r”   Úpathc                 ó  • [         R                  S:X  ax  SSKnSSKJnJnJn  SnUR                  X$U5      " SUR                  R                  45      n[        U [        5      (       a  [        R                  " U 5      n U" X5      (       d  ggg)zÁMark path as to be hidden if supported by platform and filesystem.

On win32 uses SetFileAttributesW api:
<https://docs.microsoft.com/windows/desktop/api/fileapi/nf-fileapi-setfileattributesw>
Úwin32r   N)ÚBOOLÚDWORDÚLPCWSTRrå   ÚSetFileAttributesW)ÚsysÚplatformÚctypesÚctypes.wintypesrø   rù   rú   ÚWINFUNCTYPEÚwindllÚkernel32Ú
isinstanceÚbytesr¬   Úfsdecode)rõ   rþ   rø   rù   rú   ÚFILE_ATTRIBUTE_HIDDENrû   s          r‘   Ú_set_filesystem_hiddenr  ¥  s~   € ô ‡|�|�wÓÛß8Ñ8à !ÐØ#×/Ñ/°¸uÔEØ! 6§=¡=×#9Ñ#9Ð:ó
Ðô �dœE×"Ñ"Ü—;’;˜tÓ$ˆDÙ! $×>Ñ>Øð ?ð r”   úSharedPerm | Nonec                 ón  • [        U [        5      (       a  U R                  SSS9n [        U [        5      (       a  U (       a  [        $ S$ U R                  5       nUS;   a  gUS;   a  [        $ US;   a  [        $ U R                  S5      (       a   [        U S	5      n[        US
S9$ g! [         a     gf = f)z¼Parse core.sharedRepository configuration value.

Args:
  value: Configuration value (string, bytes, or boolean)

Returns:
  SharedPerm to apply, or None to leave permissions to the umask
rÄ   rÓ   ©ÚerrorsN)ÚfalseÚ0Ú Úumask)ÚtrueÚ1Úgroup)ÚallÚworldÚ	everybodyÚ2r  é   T)ÚtweakrÓ   )r  r  r×   ÚboolrN   ÚlowerrM   rÌ   ÚintrP   rÖ   )rÜ   Úvalue_lowerÚmodes      r‘   r   r   ¼  sÆ   € ô �%œ×ÑØ—‘˜W¨Y�Ð7ˆô �%œ×Ñæ"ŒzÐ,¨Ð,ð —+‘+“-€KàÐ1Ó1ààÐ,Ó,ÜÐàÐ8Ó8äÐð ×Ñ˜×Ñð	8Ü�u˜a“=ˆDô  D°$Ñ7Ð7ð øô ó 	Øð
 ð	ús   ÂB' Â'
B4Â3B4r   c                 óø   • U R                  5       n [        UR                  SS5      5      nUS:  a  UR	                  SSS5        UR	                  SSS5        UR                  5         g	! [         a    Sn NKf = f)
zàEnable the relativeworktrees extension in repository config.

This sets core.repositoryformatversion to 1 (if not already) and
enables the extensions.relativeworktrees extension.

Args:
    repo: The repository to configure
©ÚcoreÚrepositoryformatversionr   r.   r  )Ú
extensionsÚrelativeworktreesTN)Ú
get_configr  r®   r¶   ÚsetÚwrite_to_path)Úrepor¿   Úversions      r‘   Ú$_enable_relative_worktrees_extensionr)  é  sz   € ð �_‰_Ó€FðÜ�f—j‘j Ð,EÓFÓGˆð �ƒ{Ø�
‰
�9Ð7¸Ô=ð ‡J�JˆÐ 3°TÔ:Ø
×ÑÕøô ó ØŠðús   ’A* Á*A9Á8A9c            	       óx   • \ rS rSrSr0 / 4SSS\\\\   4   S\\   SS4S	 jjr	 SS
\S\
S-  S\\   4S jjrSrg)r   i  z'Provider for commit parent information.Ústorer=   rè   Úshallowsr�   Nc                 óf   • Xl         X l        [        U5      U l        UR	                  5       U l        g)z‚Initialize ParentsProvider.

Args:
    store: Object store to use
    grafts: Graft information
    shallows: Shallow commit SHAs
N)r+  rè   r%  r,  Úget_commit_graphÚcommit_graph)r�   r+  rè   r,  s       r‘   r’   ÚParentsProvider.__init__  s,   € ð Œ
ØŒÜ˜H›ˆŒð "×2Ñ2Ó4ˆÕr”   Ú	commit_idrë   c           
      óÆ  •  U R                   U   $ ! [         a     Of = fXR                  ;   a  / $ U R                  (       a   U R                  R	                  U5      nUb  U$ Uco  U R
                  U   n[        U[        5      (       dI  [        SUR                  5        S[        U5      R                   S[        U5      R                   S35      eUnUR                  nU$ )z4Get parents for a commit using the parents provider.z%Expected Commit object for commit_id z, got z-. This usually means a reference points to a ú object instead of a Commit.)rè   r¶   r,  r/  Úget_parentsr+  r  rb   rÖ   r×   Útyper–   rí   )r�   r1  rë   rí   ÚobjÚresults         r‘   r4  ÚParentsProvider.get_parents  sì   € ð	Ø—;‘;˜yÑ)Ð)øÜó 	Ùð	úàŸ™Ó%ØˆIð ××Ø×'Ñ'×3Ñ3°IÓ>ˆGØÑ"Ø�ð ‰>Ø—*‘*˜YÑ'ˆCÜ˜c¤6×*Ñ*Ü Ø;¸I×<LÑ<LÓ<NÐ;Oð PÜ ›9×-Ñ-Ð.ð /#Ü#'¨£9×#5Ñ#5Ð"6Ð6RðTóð ð
 ˆFØ!'§¡ˆØˆs   ‚ ‘
�)r/  rè   r,  r+  ©N)r–   r—   r˜   r™   rš   Údictrc   Úlistr!   r’   rb   r4  rœ   r�   r”   r‘   r   r     s{   † Ù1ð
 24Ø')ñ	5à ð5ð �X˜t H™~Ð-Ñ.ð5ð ˜8Ñ$ð	5ð
 
õ5ð* <@ñØ!ðØ+1°D©=ðà	ˆh‰÷ð r”   r   c                   ó$  • \ rS rSrSr SnSSS\SSS	S4S
 jjrS	\4S jrS	\4S jr	    SoS\S\S-  S\
S-  S\\-  S-  S\S-  S	S4S jjrSpS jrS\S	\S-  4S jrS\S\S	S4S jrS\S	S4S jrSnSqS jjrS\S	S4S jr   SrSS S\\\\4   \
S-  /\\   4   S-  S\S    S-  S!\
S-  S	\\\4   4
S" jjrSSS#.S\\\\4   \
S-  /\\   4   S$S%S\\/S4   S-  S&\/ \\\4   4   S-  S!\
S-  S	\\
\S'   4   4S( jjrSSS#.S\\\\4   \
S-  /\\   4   S$S%S\\/S4   S-  S&\/ \\\4   4   S-  S!\
S-  S	\S-  4S) jjr SSSS*.S+\!\   S,\!\   S-\!\   S-  S\\/S4   S-  S.\S-  S	\\
\S'   4   4S/ jjr" SnS0\\   S-  S	\#4S1 jjr$S	\\\4   4S2 jr%S	\4S3 jr&S4\\'-  S5\(\)   S	\)4S6 jr*S4\\'-  S	\+4S7 jr,S	\-4S8 jr. SnS4\S9\/S-  S	\\   4S: jjr0SsS; jr1SsS< jr2S	\S-  4S= jr3S>\S	S4S? jr4StS@ jr5 SuSSSA\S-  S	SB4SC jjr6SnSA\S-  S	SD4SE jjr7SvSG jr8S	\!\   4SH jr9SI\!\   S-  SJ\!\   S-  S	S4SK jr:SL\S	\4SM jr;\<SwSN j5       r=            SxSO\>\   S-  SP\>\   S-  SQ\SR\SS\
S-  ST\>\   S-  SUSVSW\SX\
S-  SY\
S-  SZ\(S-  S[\S	S\4S] jjr?S^\\-  \-  S	S_4S` jr@S^\S	\4Sa jrAS^\Sb\+\-  S	S4Sc jrBS^\S	S4Sd jrC SnSSFSe\S-  S	\4Sf jjrDSg\\\\   4   S	S4Sh jrESySi\>\   S	S4Sj jjrFS^\S	\\   4Sk jrGSzSl jrHSmrIg){r   i8  aK  Base class for a git repository.

This base class is meant to be used for Repository implementations that e.g.
work on top of a different transport than a standard filesystem path.

Attributes:
  object_store: Dictionary-like object for accessing
    the objects
  refs: Dictionary-like object with the refs in this
    repository
NÚobject_storer_   r€   Úobject_formatzObjectFormat | Noner�   c                 ón   • Xl         X l        0 U l        0 U l        Uc  UR                  U l        gX0l        g)a  Open a repository.

This shouldn't be called directly, but rather through one of the
base classes, such as MemoryRepo or Repo.

Args:
  object_store: Object store to use
  refs: Refs container to use
  object_format: Hash algorithm to use (if None, will use object_store's format)
N)r=  r€   Ú_graftpointsrˆ   r>  )r�   r=  r€   r>  s       r‘   r’   ÚBaseRepo.__init__E  s8   € ð  )ÔØŒ	à<>ˆÔØ&(ˆŒ
ØÑ Ø/;×/IÑ/IˆDÕà!.Õr”   c                 ó,   • [        U R                  5      e)ú†Probe the file-system to determine whether permissions can be trusted.

Returns: True if permissions can be trusted, False otherwise.
)ÚNotImplementedErrorÚ_determine_file_mode©r�   s    r‘   rE  ÚBaseRepo._determine_file_mode_  s   € ô
 " $×";Ñ";Ó<Ð<r”   c                 ó(   • [         R                  S:g  $ ©zProbe the filesystem to determine whether symlinks can be created.

Returns: True if symlinks can be created, False otherwise.
r÷   ©rü   rý   rF  s    r‘   Ú_determine_symlinksÚBaseRepo._determine_symlinksf  ó   € ô �|‰|˜wÑ&Ð&r”   ÚbareÚsymlinksÚformatÚshared_repositoryc                 ó,  • SSK Jn  U R                  SS5        [        5       nU" 5       nUS:X  a  Uc  SnOUS:w  a  [	        S5      eOUc  SnUS	;  a  [	        S
U 35      eUR                  SS[        U5      5        US:X  a  UR                  SSS5        SSKJn	  U	" U5      U l        U R                  5       (       a  UR                  SSS5        OUR                  SSS5        Uc  U(       d  U R                  5       nUSL a  UR                  SSU5        [        R                  S:X  a  UR                  SSS5        UR                  SSU5        UR                  SSS5        Ub<  [        U[        5      (       a  UR                  SSU5        OUR                  SSU5        UR                  U5        U R                  SUR!                  5       5        U R                  ["        R$                  R'                  SS5      S5        U R)                  U5        g)z(Initialize a default set of named files.r.   ©r4   Údescriptions   Unnamed repositoryÚsha256Nz9SHA256 object format requires repository format version 1r   ©r   r.   z'Unsupported repository format version: r   r!  r"  Úobjectformat©Úget_object_formatÚfilemodeTFrO  ÚdarwinÚprecomposeunicoderN  ÚlogallrefupdatesÚsharedRepositoryr¿   r‰   Úexcluder”   )r¿   r4   Ú_put_named_filer%   rÖ   r%  r›   r>  rY  rE  rK  rü   rý   r  r  Úwrite_to_fileÚgetvaluer¬   rõ   ró   Ú_init_config)
r�   rN  rO  rP  rQ  r>  r4   ÚfÚcfrY  s
             r‘   Ú_init_filesÚBaseRepo._init_filesn  sè  € õ 	'à×Ñ˜]Ð,AÔBÜ‹IˆÙ‹\ˆð ˜HÓ$à‰~Ø‘Ø˜1“Ü ØOóð ð ð ‰~Ø�à˜ÓÜÐFÀvÀhÐOÓPÐPà
�‰ˆvÐ0´#°f³+Ô>ð ˜HÓ$Ø�F‰F�< °Ô:õ 	5á.¨}Ó=ˆÔà×$Ñ$×&Ñ&Ø�F‰F�6˜: tÕ,à�F‰F�6˜: uÔ-àÑ¦DØ×/Ñ/Ó1ˆHà�uÒØ�F‰F�6˜: xÔ0ô �<‰<˜8Ó#Ø�F‰F�6Ð.°Ô5à
�‰ˆv�v˜tÔ$Ø
�‰ˆvÐ)¨4Ô0ð Ñ(ÜÐ+¬T×2Ñ2Ø—‘�vÐ1Ð3DÕEà—‘�vÐ1Ð3DÔEà
×Ñ˜ÔØ×Ñ˜X q§z¡z£|Ô4Ø×ÑœRŸW™WŸ\™\¨&°)Ó<¸cÔBð 	×Ñ˜"Õr”   r¿   c                 ó   • g)z²Initialize repository configuration.

This method can be overridden by subclasses to handle config initialization.

Args:
    config: The ConfigFile object that was just created
Nr�   ©r�   r¿   s     r‘   rc  ÚBaseRepo._init_configº  s   � r”   rõ   c                 ó,   • [        U R                  5      e)al  Get a file from the control dir with a specific name.

Although the filename should be interpreted as a filename relative to
the control dir in a disk-based Repo, the object returned need not be
pointing to a file in that location.

Args:
  path: The path to the file, relative to the control dir.
Returns: An open file object, or None if the file does not exist.
)rD  Úget_named_file©r�   rõ   s     r‘   rl  ÚBaseRepo.get_named_fileÄ  s   € ô " $×"5Ñ"5Ó6Ð6r”   Úcontentsc                 ó,   • [        U R                  5      e)ú¯Write a file to the control dir with the given name and contents.

Args:
  path: The path to the file, relative to the control dir.
  contents: A string to write to the file.
)rD  r`  ©r�   rõ   ro  s      r‘   r`  ÚBaseRepo._put_named_fileÑ  s   € ô " $×"6Ñ"6Ó7Ð7r”   c                 ó,   • [        U R                  5      e)z;Delete a file in the control directory with the given name.)rD  Ú_del_named_filerm  s     r‘   ru  ÚBaseRepo._del_named_fileÚ  s   € ä! $×"6Ñ"6Ó7Ð7r”   úConfig | Nonec                 ó,   • [        U R                  5      e)zýOpen the index for this repository.

Args:
  config: Configuration to consult for index settings. If None,
    implementations may fall back to ``self.get_config_stack()``.

Raises:
  NoIndexPresent: If no index is present
Returns: The matching `Index`
)rD  Ú
open_indexri  s     r‘   ry  ÚBaseRepo.open_indexÞ  s   € ô " $§/¡/Ó2Ð2r”   Úobject_format_namec                 ód  • U R                    H  n[        S5      e   SSKJn  U" U5      nX@l        X@R                   l        U R	                  5       nUS:X  a   UR                  SS5        O&UR                  SSS	5        UR                  SSU5        UR                  5         g
! [         a     Nf = f)a  Change the object format of this repository.

This can only be done if the object store is empty (no objects written yet).

Args:
  object_format_name: Name of the new object format (e.g., "sha1", "sha256")

Raises:
  AssertionError: If the object store is not empty
z@Cannot change object format: repository already contains objectsr.   rX  Úsha1r"  rW  r   r!  r  N)	r=  ÚAssertionErrorr>  rY  r$  Úremover¶   r%  r&  )r�   r{  Ú_rY  Ú
new_formatr¿   s         r‘   Ú_change_object_formatÚBaseRepo._change_object_formatë  s³   € ð ×"Ô"ˆAÜ ØRóð ñ #õ 	5á&Ð'9Ó:ˆ
Ø'ÔØ*4×ÑÔ'ð —‘Ó"ˆà Ó'ðØ—‘˜l¨NÕ;ð
 �J‰J�vÐ8¸#Ô>Ø�J‰J�| ^Ð5GÔHà×ÑÕøô ó Ùðús   ÁB" Â"
B/Â.B/ÚtargetÚdetermine_wantsÚprogress).NÚdepthc                 óN  • U R                   UR                   :w  a%  UR                  U R                   R                  5        Uc  UR                  R                  nU R                  UUR                  5       UUS9u  pVUR                  R                  XVU5        U R                  5       $ )zýFetch objects into another repository.

Args:
  target: The target repository
  determine_wants: Optional function to determine what refs to
    fetch.
  progress: Optional progress function
  depth: Optional shallow fetch depth
Returns: The local refs
)r†  r‡  )	r>  r‚  r¹   r=  Údetermine_wants_allÚfetch_pack_dataÚget_graph_walkerÚadd_pack_dataÚget_refs)r�   r„  r…  r†  r‡  ÚcountÚ	pack_datas          r‘   ÚfetchÚBaseRepo.fetch  sš   € ð& ×Ñ ×!5Ñ!5Ó5à×(Ñ(¨×);Ñ);×)@Ñ)@ÔAàÑ"Ø$×1Ñ1×EÑEˆOØ×/Ñ/ØØ×#Ñ#Ó%ØØð	 0ð 
Ñˆð 	×Ñ×)Ñ)¨%¸HÔEØ�}‰}‹Ðr”   ©Ú
get_taggedr‡  Úgraph_walkerr>   r“  r?   c                óº   • U R                  XX4US9nUc  S[        / 5      4$ UR                  5       n[        U5      n[	        U5      [        U R                  XƒUS94$ )aV  Fetch the pack data required for a set of revisions.

Args:
  determine_wants: Function that takes a dictionary with heads
    and returns the list of heads to fetch.
  graph_walker: Object that can iterate over the list of revisions
    to fetch and has an "ack" method that will be called to acknowledge
    that a revision is present.
  progress: Simple progress function that will be called with
    updated progress strings.
  get_tagged: Function that returns a dict of pointed-to sha ->
    tag sha for including tags.
  depth: Shallow fetch depth
Returns: count and iterator over pack data
r’  r   )r†  Úother_haves)Úfind_missing_objectsÚiterÚget_remote_hasr;  rç   rj   r=  )	r�   r…  r”  r†  r“  r‡  Úmissing_objectsÚ
remote_hasÚ
object_idss	            r‘   rŠ  ÚBaseRepo.fetch_pack_data5  su   € ð0 ×3Ñ3Ø¨8ÐRWð 4ð 
ˆð Ñ"Ø”d˜2“h�;ÐØ$×3Ñ3Ó5ˆ
Ü˜/Ó*ˆ
Ü�:‹Ô 9Ø×Ñ˜zÈ*ñ!
ð 
ð 	
r”   c                óˆ  ^• U R                  5       n0 nUR                  5        HP  u  p‰X�R                  ;   a  X—U'   M  [        R	                  SUR                  SS5      U	R                  S5      5        MR     U" Xu5      n
[        U
[        5      (       d  [        S5      e[        [        US[        5       5      5      n[        5       nUS;  a€  Uc   e[        U R                  X¥5      u  pÞ[        USS5      nUbR  Xë-  nUR                  XÞ-
  5        UR                  U5        Xû-
  n[        US	U5        [        US
S5      nUb	  U" UU5        O[        US	[        5       5      nU
/ :X  a7  [        US[        5       5      (       d  U(       a  g[        U R                  / / S9$ U R                  R!                  U5      n[        US[        5       5      (       d  U(       a  / n[#        U R                  [        USU5      S9mS[$        S[        [&           4U4S jjn[        U R                  UU
[        US[        5       5      UUUS9$ )aj  Fetch the missing objects required for a set of revisions.

Args:
  determine_wants: Function that takes a dictionary with heads
    and returns the list of heads to fetch.
  graph_walker: Object that can iterate over the list of revisions
    to fetch and has an "ack" method that will be called to acknowledge
    that a revision is present.
  progress: Simple progress function that will be called with
    updated progress strings.
  get_tagged: Function that returns a dict of pointed-to sha ->
    tag sha for including tags.
  depth: Shallow fetch depth
Returns: iterator over objects, with __len__ implemented
z#ref %s points at non-present sha %srÄ   rÓ   Úasciiz'determine_wants() did not return a listÚshallow)Nr   NÚ	unshallowÚupdate_shallow)ÚhavesÚwants)r,  rë   r�   c                 ó<   >• TR                  U R                  U 5      $ )z{Get parents for a commit using the parents provider.

Args:
  commit: Commit object

Returns:
  List of parent commit SHAs
©r4  Úid)rë   Úparents_providers    €r‘   r4  Ú2BaseRepo.find_missing_objects.<locals>.get_parents¼  s   ø€ ð $×/Ñ/°·	±	¸6ÓBÐBr”   )r£  r¤  r   r†  r“  r4  )r�  rñ   r=  ÚloggerÚwarningr×   r  r;  Ú	TypeErrorr%  r²   r`   ÚupdateÚdifference_updateÚsetattrr\   Úfind_common_revisionsr   rb   rc   )r�   r…  r”  r†  r“  r‡  Úall_refsr€   Úrefrî   r¤  Úcurrent_shallowr¡  r   Únot_shallowÚwalker_shallowÚnew_shallowr¢  r£  r4  r¨  s                       @r‘   r—  ÚBaseRepo.find_missing_objectsX  s4  ø€ ð6 —=‘=“?ˆØ$&ˆØ Ÿ™Ö(‰HˆCØ×'Ñ'Ó'Ø�S“	ä—‘Ø9Ø—J‘J˜w¨	Ó2Ø—J‘J˜wÓ'öñ	 )ñ   Ó,ˆÜ˜%¤×&Ñ&ÜÐEÓFÐFäœg l°I¼s»uÓEÓFˆä#&£5ˆ	Ø˜	Ó!ØÑ$Ð$Ð$Ü#/°×0AÑ0AÀ5Ó#PÑ ˆGä3:Ø˜i¨ó4ˆNð Ñ)Ø'Ñ9�	ð ×%Ñ% gÑ&;Ô<Ø×0Ñ0°Ô;Ø,Ñ>�Ü˜ k°9Ô=Ü!(¨Ð7GÈÓ!N�Ø!Ñ-Ù" ;°	Ô:øä ¨k¼3»5ÓAˆIà�B‹;ô �| Y´³×6Ñ6¾)àô 'Ø×!Ñ!ØØñð ð ×!Ñ!×7Ñ7¸ÓEˆô �< ¬C«E×2Ñ2¶ið ˆEä*Ø×ÑÜ˜\¨9°oÓFñ
Ðð
		C¤ð 		C¬4´©>÷ 		Cô #Ø×ÑØØÜ˜L¨)´S³UÓ;ØØ!Ø#ñ
ð 	
r”   ©r   r†  Ú	ofs_deltaÚhaveÚwantr   r¹  c                óx   • Uc  U R                  5       nU R                  R                  UUUUUb  US9$ [        S9$ )a]  Generate pack data objects for a set of wants/haves.

Args:
  have: List of SHA1s of objects that should not be sent
  want: List of SHA1s of objects that should be sent
  shallow: Set of shallow commit SHA1s to skip (defaults to repo's shallow commits)
  ofs_delta: Whether OFS deltas can be included
  progress: Optional progress reporting method
r¸  )Úget_shallowr=  Úgenerate_pack_datar   )r�   rº  r»  r   r†  r¹  s         r‘   r¾  ÚBaseRepo.generate_pack_dataÑ  s^   € ð$ ‰?Ø×&Ñ&Ó(ˆGØ× Ñ ×3Ñ3ØØØØØ#,Ñ#8�ið 4ð 
ð 	
ô
 ?Pð 4ð 
ð 	
r”   r‚   c                 ó>  • UcS  U R                   R                  [        S5      5      R                  5        Vs/ s H  nX R                  ;   d  M  UPM     nn[        U R                  5      n[        UUR                  U R                  5       U R                  S9$ s  snf )zßRetrieve a graph walker.

A graph walker is used by a remote repository (or proxy)
to find out which objects are present in this repository.

Args:
  heads: Repository heads to use (optional)
Returns: A graph walker object
ó
   refs/heads)r   r¢  )
r€   Úas_dictrn   Úvaluesr=  r   r]   r4  r½  r¢  )r�   r‚   rî   r¨  s       r‘   r‹  ÚBaseRepo.get_graph_walkerí  sš   € ð ‰=ð  Ÿ9™9×,Ñ,¬S°Ó-?Ó@×GÑGÔIóâI�CØ×+Ñ+Ñ+÷ ÙIð ð ô
 +¨4×+<Ñ+<Ó=ÐÜ%ØØ×(Ñ(Ø×$Ñ$Ó&Ø×.Ñ.ñ	
ð 	
ùòs   ¸BÁBc                 ó6   • U R                   R                  5       $ )zNGet dictionary with all refs.

Returns: A ``dict`` mapping ref names to SHA1s
)r€   rÂ  rF  s    r‘   r�  ÚBaseRepo.get_refs  s   € ð
 �y‰y× Ñ Ó"Ð"r”   c                 ó(   • U R                   [           $ )z#Return the SHA1 pointed at by HEAD.)r€   rk   rF  s    r‘   ÚheadÚBaseRepo.head  s   € ð �y‰yœÑ!Ð!r”   rî   Úclsc                 óü  • [        U5      U R                  R                  U R                  R                  4;   d   eU R	                  U5      n[        X25      (       dŸ  U[        L a  [        UR                  5      eU[        L a  [        UR                  5      eU[        L a  [        UR                  5      eU[        L a  [        UR                  5      e[        SUR                   < SUR                   < 35      eU$ )NzType invalid: z != )rç   r>  Ú
oid_lengthÚ
hex_lengthÚ
get_objectr  rb   rH   r§  ra   rG   rg   rK   rf   rJ   Ú	ExceptionÚ	type_name)r�   rî   rÊ  Úrets       r‘   Ú_get_objectÚBaseRepo._get_object  sÕ   € Ü�3‹xØ×Ñ×)Ñ)Ø×Ñ×)Ñ)ð
ó 
ð 	
ð 
ð �o‰o˜cÓ"ˆÜ˜#×#Ñ#Ø”fŠ}Ü$ S§V¡VÓ,Ð,Øœ’Ü" 3§6¡6Ó*Ð*Øœ’Ü" 3§6¡6Ó*Ð*Øœ’Ü! #§&¡&Ó)Ð)ä .°·±Ñ0AÀÀcÇmÁmÑEVÐ WÓXÐXØˆ
r”   c                 ó    • U R                   U   $ )z™Retrieve the object with the specified SHA.

Args:
  sha: SHA to retrieve
Returns: A ShaFile object
Raises:
  KeyError: when the object can not be found
)r=  )r�   rî   s     r‘   rÎ  ÚBaseRepo.get_object&  s   € ð × Ñ  Ñ%Ð%r”   c                 ó\   • [        U R                  U R                  U R                  5       S9$ )zuGet a parents provider for this repository.

Returns:
  ParentsProvider instance configured with grafts and shallows
)rè   r,  )r   r=  r@  r½  rF  s    r‘   r¨  ÚBaseRepo.parents_provider1  s/   € ô Ø×ÑØ×$Ñ$Ø×%Ñ%Ó'ñ
ð 	
r”   rë   c                 ó@   • U R                  5       R                  X5      $ )a  Retrieve the parents of a specific commit.

If the specific commit is a graftpoint, the graft parents
will be returned instead.

Args:
  sha: SHA of the commit for which to retrieve the parents
  commit: Optional commit matching the sha
Returns: List of parents
)r¨  r4  )r�   rî   rë   s      r‘   r4  ÚBaseRepo.get_parents=  s   € ð ×$Ñ$Ó&×2Ñ2°3Ó?Ð?r”   c                 ó,   • [        U R                  5      e)úXRetrieve the config object.

Returns: `ConfigFile` object for the ``.git/config`` file.
)rD  r$  rF  s    r‘   r$  ÚBaseRepo.get_configL  s   € ô
 " $§/¡/Ó2Ð2r”   c                 ó,   • [        U R                  5      e)z$Retrieve the worktree config object.)rD  Úget_worktree_configrF  s    r‘   rÞ  ÚBaseRepo.get_worktree_configS  s   € ä! $×":Ñ":Ó;Ð;r”   c                 ó,   • [        U R                  5      e)z}Retrieve the description for this repository.

Returns: Bytes with the description of the repository
    as set by the user.
)rD  Úget_descriptionrF  s    r‘   rá  ÚBaseRepo.get_descriptionW  ó   € ô " $×"6Ñ"6Ó7Ð7r”   rT  c                 ó,   • [        U R                  5      e)úoSet the description for this repository.

Args:
  description: Text to set as description for this repository.
)rD  Úset_description©r�   rT  s     r‘   ræ  ÚBaseRepo.set_description_  rã  r”   c                 ó,   • [        U R                  5      e)zdGet the appropriate rebase state manager for this repository.

Returns: RebaseStateManager instance
)rD  Úget_rebase_state_managerrF  s    r‘   rê  Ú!BaseRepo.get_rebase_state_managerg  s   € ô
 " $×"?Ñ"?Ó@Ð@r”   Útreer7   c                 ó,   • [        U R                  5      e)aS  Return a BlobNormalizer object for checkin/checkout operations.

Args:
  config: Configuration to consult for filter setup. If None,
    implementations may fall back to ``self.get_config_stack()``.
  tree: Tree to read .gitattributes from, e.g. the tree being
    checked out. See ``get_gitattributes``.

Returns: BlobNormalizer instance
)rD  Úget_blob_normalizer)r�   r¿   rì  s      r‘   rî  ÚBaseRepo.get_blob_normalizern  s   € ô " $×":Ñ":Ó;Ð;r”   r0   c                 ó,   • [        U R                  5      e)z³Read gitattributes for the repository.

Args:
    tree: Tree SHA to read .gitattributes from (defaults to HEAD)

Returns:
    GitAttributes object that can be used to match paths
)rD  Úget_gitattributes)r�   rì  s     r‘   rñ  ÚBaseRepo.get_gitattributes}  s   € ô " $×"8Ñ"8Ó9Ð9r”   r5   c                 óØ   • SSK JnJn  U R                  5       nU/nUR	                  SSS5      (       a  UR                  U R                  5       5        XBR                  " 5       -  nU" XCS9$ )zóReturn a config stack for this repository.

This stack accesses the configuration for both this repository
itself (.git/config) and the global configuration, which usually
lives in ~/.gitconfig.

Returns: `Config` instance for this repository
r.   )r4   r5   ©s
   extensionsó   worktreeconfigF)Úwritable)r¿   r4   r5   r$  Úget_booleanrò   rÞ  Údefault_backends)r�   r4   r5   Úlocal_configÚbackendss        r‘   Úget_config_stackÚBaseRepo.get_config_stackˆ  sb   € ÷ 	6à—‘Ó(ˆØ&2 ^ˆØ×#Ñ#Ð$4Ð6GÈ×OÑOØ�O‰O˜D×4Ñ4Ó6Ô7à×2Ò2Ó4Ñ4ˆÙ˜XÑ=Ð=r”   c                 ó   • U R                  S5      nUc
  [        5       $ U   [        5       nU HB  nUR                  5       nU(       d  M  [        US5        UR	                  [        U5      5        MD     UsSSS5        $ ! , (       d  f       g= f)zBGet the set of shallow commits.

Returns: Set of shallow commits.
r   Núinvalid shallow object id)rl  r%  rÞ   rh   Úaddrc   )r�   rd  r   ré   rî   s        r‘   r½  ÚBaseRepo.get_shallow›  so   € ð
 ×Ñ 	Ó*ˆØ‰9Ü“5ˆLÚÜ%(£UˆGÛ�Ø—j‘j“l�ÞÙÜ˜SÐ"=Ô>Ø—‘œH S›MÖ*ñ ð ÷ �Q�Qús   ¡AA?Á?
Br¶  Únew_unshallowc           
      ó€  • / U=(       d    SQU=(       d    SQ7 H  n[        US5        M     U R                  5       nU(       a  UR                  U5        U(       a  UR                  U5        U(       a5  U R	                  SSR                  U Vs/ s H  o3S-   PM	     sn5      5        gU R                  S5        gs  snf )z�Update the list of shallow objects.

Args:
  new_shallow: Newly shallow objects
  new_unshallow: Newly no longer shallow objects
r�   rþ  r   r”   rÕ   N)rh   r½  r­  r®  r`  ró   ru  )r�   r¶  r  rî   r   s        r‘   r¢  ÚBaseRepo.update_shallow­  sž   € ð B�k×' RÐA¨M×,?¸RÔAˆCÜ˜Ð9Ö:ñ Bà×"Ñ"Ó$ˆÞØ�N‰N˜;Ô'ÞØ×%Ñ% mÔ4ÞØ× Ñ  ¨C¯H©HÉWÓ5UÊWÀc¸E´kÉWÑ5UÓ,VÕWà× Ñ  Õ+ùò 6Vs   ÂB;r²  c                 ó¬   • U R                   R                  U5      nUb  U$ U R                  R                  U R                   U   5      S   R                  $ )zïGet the peeled value of a ref.

Args:
  ref: The refname to peel.
Returns: The fully-peeled SHA1 of a tag object, after peeling all
    intermediate tags; if the original ref does not point to a tag,
    this will equal the original SHA1.
r.   )r€   Ú
get_peeledr=  Úpeelr§  )r�   r²  Úcacheds      r‘   r  ÚBaseRepo.get_peeledÂ  sM   € ð —‘×%Ñ% cÓ*ˆØÑØˆMØ× Ñ ×%Ñ% d§i¡i°¡nÓ5°aÑ8×;Ñ;Ð;r”   c                 óH   • SSK Jn  U" U R                  U R                  5      $ )z_Access notes functionality for this repository.

Returns:
    Notes object for accessing notes
r.   r:   )Únotesr;   r=  r€   )r�   r;   s     r‘   r
  ÚBaseRepo.notesÐ  s   € õ 	!á�T×&Ñ&¨¯	©	Ó2Ð2r”   Úincluder_  ÚorderÚreverseÚmax_entriesÚpathsÚrename_detectorzRenameDetector | NoneÚfollowÚsinceÚuntilÚ	queue_clsÚsimplify_historyrA   c                 óŽ   ^ • SSK JnJn  Uc  T R                  5       /nU" T R                  UUUUUUUUU	U
U 4S jUb  UUS9$ UUS9$ )a*  Obtain a walker for this repository.

Args:
  include: Iterable of SHAs of commits to include along with their
    ancestors. Defaults to [HEAD]
  exclude: Iterable of SHAs of commits to exclude along with their
    ancestors, overriding includes.
  order: ORDER_* constant specifying the order of results.
    Anything other than ORDER_DATE may result in O(n) memory usage.
  reverse: If True, reverse the order of output, requiring O(n)
    memory.
  max_entries: The maximum number of entries to yield, or None for
    no limit.
  paths: Iterable of file or subtree paths to show entries for.
  rename_detector: diff.RenameDetector object for detecting
    renames.
  follow: If True, follow path across renames/copies. Forces a
    default rename_detector.
  since: Timestamp to list commits after.
  until: Timestamp to list commits before.
  queue_cls: A class to use for a queue of commits, supporting the
    iterator protocol. The constructor takes a single argument, the Walker.
  simplify_history: If True and paths is set, perform git-style
    history simplification: at a merge commit that is TREESAME to
    at least one parent for the requested paths, follow only that
    parent (matches ``git log <path>``). The default of False
    matches ``git log --full-history <path>``.

Returns: A `Walker` object
r.   )rA   Ú_CommitTimeQueuec                 ó<   >• TR                  U R                  U 5      $ r9  r¦  )rë   r�   s    €r‘   Ú<lambda>Ú%BaseRepo.get_walker.<locals>.<lambda>  s   ø€  t×'7Ñ'7¸¿	¹	À6Ô'Jr”   )r_  r  r  r  r  r  r  r  r  r4  r  r  )ÚwalkrA   r  rÈ  r=  )r�   r  r_  r  r  r  r  r  r  r  r  r  r  rA   r  s   `              r‘   Ú
get_walkerÚBaseRepo.get_walkerÛ  sr   ø€ ÷Z 	3à‰?Ø—y‘y“{�mˆGñ Ø×ÑØØØØØ#ØØ+ØØØÜJØ#,Ñ#8�iØ-ñ
ð 	
ð ?OØ-ñ
ð 	
r”   r¹   re   c                 ó¢  • [        U[        5      (       d"  [        S[        U5      R                  S 35      eUS:X  d  UR                  S5      (       a&   U R                  U R                  [        U5            $ [        U5      U R                  R                  R                  U R                  R                  R                  4;   aS   U R                  [        U5      U R                  R                  R                  :X  a  [        U5         $ [!        U5         $ [        U5      e! [        [        4 a     N½f = f! [        ["        4 a     N3f = f)zÏRetrieve a Git object by SHA1 or ref.

Args:
  name: A Git object SHA1 or a ref name
Returns: A `ShaFile` object, such as a Commit or Blob
Raises:
  KeyError: when the specified ref or object does not exist
z'name' must be bytestring, not z.80ó   HEADó   refs/)r  r  r¬  r5  r–   rÌ   r=  r€   rn   rL   r¶   rç   r>  rÌ  rÍ  rc   rd   rÖ   ©r�   r¹   s     r‘   Ú__getitem__ÚBaseRepo.__getitem__  s7  € ô ˜$¤×&Ñ&ÜÐ=¼dÀ4»j×>QÑ>QÐRUÐ=VÐWÓXÐXà�7‹?˜dŸo™o¨h×7Ñ7ðØ×(Ñ(¨¯©´3°t³9Ñ)=Ñ>Ð>ô ˆt‹9Ø×Ñ×+Ñ+×6Ñ6Ø×Ñ×+Ñ+×6Ñ6ð
ó 
ðØ×(Ñ(ä˜4“y D×$5Ñ$5×$CÑ$C×$NÑ$NÓNô ˜T“Nñð ô % TÓ*ñð ô �t‹nÐøô! #¤HÐ-ó Ùðûô œjÐ)ó Ùðús+   Á$D% ÃAD; ÄD; Ä%D8Ä7D8Ä;EÅEc                 ó  • [        U5      U R                  R                  :X  aG  [        U5      (       a7  [	        U5      U R
                  ;   =(       d    [        U5      U R                  ;   $ [        U5      U R                  ;   $ )zdCheck if a specific Git object or ref is present.

Args:
  name: Git object SHA1/SHA256 or ref name
)rç   r>  rÍ  ri   rc   r=  rn   r€   r"  s     r‘   Ú__contains__ÚBaseRepo.__contains__@  s`   € ô ˆt‹9˜×*Ñ*×5Ñ5Ó5¼,Àt×:LÑ:LÜ˜D“> T×%6Ñ%6Ñ6×P¼#¸d»)ÀtÇyÁyÑ:PÐPÜ�4‹y˜DŸI™IÑ%Ð%r”   rÜ   c                 ó>  • UR                  S5      (       d
  U[        :X  as  [        U5      n[        U[        5      (       a  UR
                  U R                  U'   g[        U[        5      (       a  [        U5      U R                  U'   g[        U5      e[        U5      e)z^Set a ref.

Args:
  name: ref name
  value: Ref value - either a ShaFile object, or a hex sha
r!  N)rÌ   rk   rn   r  re   r§  r€   r  rc   r¬  rÖ   )r�   r¹   rÜ   Úref_names       r‘   Ú__setitem__ÚBaseRepo.__setitem__K  sv   € ð �?‰?˜8×$Ñ$¨´«Ü˜4“yˆHÜ˜%¤×)Ñ)Ø&+§h¡h�—	‘	˜(Ò#Ü˜E¤5×)Ñ)Ü&.¨u£o�—	‘	˜(Ò#ä Ó&Ð&ä˜TÓ"Ð"r”   c                 ó†   • UR                  S5      (       d
  U[        :X  a  U R                  [        U5      	 g[	        U5      e)z7Remove a ref.

Args:
  name: Name of the ref to remove
r!  N)rÌ   rk   r€   rn   rÖ   r"  s     r‘   Ú__delitem__ÚBaseRepo.__delitem__]  s4   € ð �?‰?˜8×$Ñ$¨´«Ø—	‘	œ#˜d›)Ñ$ä˜TÓ"Ð"r”   rÀ   c                 óN   • [         R                  " S[        5        [        U5      $ )z.Determine the identity to use for new commits.z;use get_user_identity() rather than Repo._get_user_identity)ÚwarningsÚwarnÚDeprecationWarningr   )r�   r¿   rÀ   s      r‘   Ú_get_user_identityÚBaseRepo._get_user_identityh  s#   € ô 	�ŠØIÜô	
ô ! Ó(Ð(r”   Úupdated_graftpointsc                 óœ   • UR                  5        H  u  p#U/UQ H  n[        US5        M     M     U R                  R                  U5        g)zdAdd or modify graftpoints.

Args:
  updated_graftpoints: Dict of commit shas to list of parent shas
ræ   N)rñ   rh   r@  r­  )r�   r5  rë   rí   rî   s        r‘   Ú_add_graftpointsÚBaseRepo._add_graftpointsr  sM   € ð  3×8Ñ8Ö:‰OˆFØÐ) Ó)�Ü˜SÐ"6Ö7ó *ñ  ;ð 	×Ñ× Ñ Ð!4Õ5r”   Ú	to_removec                 ó0   • U H  nU R                   U	 M     g)z<Remove graftpoints.

Args:
  to_remove: List of commit shas
N)r@  )r�   r9  rî   s      r‘   Ú_remove_graftpointsÚBaseRepo._remove_graftpoints�  s   € ó ˆCØ×!Ñ! #Ò&ò r”   c                 ó  • U R                  U5      nUc  / $ U   UR                  5        Vs/ s H2  o3R                  5       (       d  M  [        UR                  5       5      PM4     snsS S S 5        $ s  snf ! , (       d  f       g = fr9  )rl  Ú	readlinesrÞ   rc   )r�   r¹   rd  ré   s       r‘   Ú_read_headsÚBaseRepo._read_headsŠ  s]   € Ø×Ñ Ó%ˆØ‰9ØˆIÚØ78·{±{´}ÓU²}¨tÏ
É
ÏÓ*”H˜TŸZ™Z›\Ö*±}ÑU÷ ‰QùÚU÷ �Qús"   ™A6¬A1ÁA1Á%A6Á1A6Á6
Bc                 ó   • [        S5      e)zÃGet the working tree for this repository.

Returns:
    WorkTree instance for performing working tree operations

Raises:
    NotImplementedError: If the repository doesn't support working trees
z=Working tree operations not supported by this repository type)rD  rF  s    r‘   Úget_worktreeÚBaseRepo.get_worktree‘  s   € ô "ØKó
ð 	
r”   )r@  rˆ   r>  r=  r€   r9  )NNNN©r¿   r4   r�   N©r¿   rw  r�   r9   ©NNN©r�   r4   ©r�   r@   ©NN)r�   r5   )r�   r;   )NNÚdateFNNNFNNNF)r�   ©r�   rC   )Jr–   r—   r˜   r™   rš   ro   r’   r  rE  rK  r  r›   rf  rc  r)   rl  r  r`  ru  ry  r‚  r   r#   rn   rc   r;  r:  r�  Útupler"   rŠ  r\   r—  r%  r¾  r]   r‹  r�  rÈ  rd   r5  r~   rÒ  re   rÎ  r   r¨  rb   r4  r$  rÞ  rá  ræ  rê  rî  rñ  rû  r½  r¢  r  Úpropertyr
  r$   r  r#  r&  r*  r-  r3  r7  r;  r?  rB  rœ   r�   r”   r‘   r   r   8  sÃ  † ñ
ð  04ñ	/à.ð/ð ð/ð -ð	/ð
 
õ/ð4= dô =ð' Tô 'ð !%Ø!Ø/3Ø$(ñJàðJð ˜‘+ðJð �d‘
ð	Jð
  ™:¨Ñ,ðJð ˜T‘zðJð 
õJôXð7 3ð 7¨8°d©?ô 7ð8 Cð 8°5ð 8¸Tô 8ð8 Cð 8¨Dô 8ö3ð&¸ð &Àô &ðX Ø/3Ø ñ àð ð " 7¨3°¨=Ñ#9¸3À¹:Ð"FÈÈXÉÐ"VÑWØ
ñð ð
 ˜9Ñ%¨Ñ,ð ð �T‰zð ð 
ˆc�8ˆmÑ	õ ðP EIØ ò!
à! 7¨3°¨=Ñ#9¸3À¹:Ð"FÈÈXÉÐ"VÑWð!
ð $ð!
ð ˜E˜7 D˜=Ñ)¨DÑ0ð	!
ð ˜R  h°Ð&8Ñ!9Ð9Ñ:¸TÑAð!
ð �T‰zð!
ð 
ˆs�HÐ-Ñ.Ð.Ñ	/õ!
ðR EIØ òw
à! 7¨3°¨=Ñ#9¸3À¹:Ð"FÈÈXÉÐ"VÑWðw
ð $ðw
ð ˜E˜7 D˜=Ñ)¨DÑ0ð	w
ð ˜R  h°Ð&8Ñ!9Ð9Ñ:¸TÑAðw
ð �T‰zðw
ð 
˜tÑ	#õw
ð| )-Ø15Ø!%ò
à�(‰mð
ð �(‰mð
ð
 �X‘ Ñ%ð
ð ˜C˜5 $˜;Ñ'¨$Ñ.ð
ð ˜$‘;ð
ð 
ˆs�HÐ-Ñ.Ð.Ñ	/õ
ð: .2ñ
Ø˜(‘^ dÑ*ð
à	õ
ð4#˜$˜s H˜}Ñ-ô #ð"�hô "ð
˜x¨+Ñ5ð ¸DÀ¹Gð Èô ð&	&˜h¨Ñ4ð 	&¸ô 	&ð

 /ô 

ð 6:ñ@Øð@Ø%+¨d¡]ð@à	ˆh‰õ@ô3ô<ð8 ¨¡ô 8ð8¨5ð 8°Tô 8ôAð DHñ<Ø%ð<Ø49¸D±Lð<à	õ<ñ	: e¨d¡lð 	:¸oõ 	:ô>ð&˜S ™]ô ð$,Ø˜x™=¨4Ñ/ð,Ø@CÀHÁÐPTÑ@Tð,à	ô,ð*<˜cð < hô <ð ó3ó ð3ð .2Ø-1ØØØ"&Ø(,Ø37ØØ Ø Ø!%Ø!&ñB
à˜(Ñ# dÑ*ðB
ð ˜(Ñ# dÑ*ðB
ð ð	B
ð
 ðB
ð ˜4‘ZðB
ð ˜‰ Ñ%ðB
ð 1ðB
ð ðB
ð �T‰zðB
ð �T‰zðB
ð ˜$‘;ðB
ð ðB
ð 
õB
ðH ¨3¡°Ñ 6ð ¸9ô ðB	& ð 	&¨4ô 	&ð# ð #¨g¸©oð #À$ô #ð$	# ð 	#¨$ô 	#ð ;?ñ)Ø%ð)Ø-0°4©Zð)à	õ)ð6Ø#'¨°$°x±.Ð(@Ñ#Að6à	ô6ñ'¨X°hÑ-?ð 'Èõ 'ðV ð V¨¨X©ô V÷
r”   r   rd  c                 ó¼   • U R                  5       nUR                  S5      (       d  [        S5      eU[        S5      S R	                  S5      R                  S5      $ )z‰Read a ``.git`` file.

The first line of the file should start with "gitdir: "

Args:
  f: File-like object to read from
Returns: A path
ó   gitdir: z&Expected file to start with 'gitdir: 'Nó   
rÄ   )ÚreadrÌ   rÖ   rç   Úrstripr×   )rd  Úcss     r‘   r   r   Ÿ  sS   € ð 
�‰‹€BØ�=‰=˜×%Ñ%ÜÐAÓBÐBØŒc�+ÓÐ Ð!×(Ñ(¨Ó1×8Ñ8¸ÓAÐAr”   c                   ó*   • \ rS rSrSrS\SS4S jrSrg)r   i®  zUnsupported repository version.r(  r�   Nc                 ó   • Xl         g)z`Initialize UnsupportedVersion exception.

Args:
    version: The unsupported repository version
N©r(  )r�   r(  s     r‘   r’   ÚUnsupportedVersion.__init__±  s	   € ð �r”   rV  )r–   r—   r˜   r™   rš   r  r’   rœ   r�   r”   r‘   r   r   ®  s   † Ù)ð ð ¨÷ r”   r   c                   ó*   • \ rS rSrSrS\SS4S jrSrg)r   iº  z!Unsupported repository extension.Ú	extensionr�   Nc                 ó   • Xl         g)zfInitialize UnsupportedExtension exception.

Args:
    extension: The unsupported repository extension
N©rY  )r�   rY  s     r‘   r’   ÚUnsupportedExtension.__init__½  s	   € ð #�r”   r[  r•   r�   r”   r‘   r   r   º  s   † Ù+ð# #ð #¨$÷ #r”   r   c                   ó   • \ rS rSrSrSrg)r   iÆ  z*core.worktree is set on a bare repository.r�   Nr    r�   r”   r‘   r   r   Æ  s   † Ü4r”   r   c                   óh   • \ rS rSrSrSSS\S-  S\S-  SS4S	 jrS
\SS4S jr	S
\S\S-  4S jr
Srg)Ú_GitAttributesLoaderiÊ  z¢Read the .gitattributes of a directory for GitAttributes.

The working tree file is used if there is one, otherwise the one in
the tree, as git does for checkin.
r=  r=   Úworktree_pathNrì  r�   c                 ó.   • Xl         X l        SU0U l        g )Nr”   )Ú_object_storeÚ_worktree_pathÚ_trees)r�   r=  r`  rì  s       r‘   r’   Ú_GitAttributesLoader.__init__Ñ  s   € ð *ÔØ+Ôà58¸$°Kˆ�r”   Údirpathz4list[tuple[Pattern, Mapping[bytes, AttributeValue]]]c                 ó¼  • SSK JnJn  U R                  bw  [        R
                  R                  " U R                  /[        R                  " U5      R                  S5      QSP76 n [        U5      nU   U" U" U5      XA5      sS S S 5        $ U R%                  U5      nUc  / $ U R&                  U   n[)        U[*        5      (       d  [-        U5      e US   u  pš[0        R2                  " U	5      (       d  / $ U R&                  U
   n[)        U[4        5      (       d  / $ U(       a  US-   OSnU" U" [7        UR8                  5      5      XÁ5      $ ! , (       d  f       NÎ= f! [        [        4 a     Nã[         aP  nUR                  [        R                  [        R                  4;  a  e [         R#                  SU5         S nAGN7S nAff = f! [.         a    / s $ f = f)Nr.   )Úcompile_gitattributes_patternsÚparse_git_attributesÚ/ú.gitattributesú"Ignoring %s: it is a symbolic links   .gitattributess   /.gitattributes)Úattrsrh  ri  rc  r¬   rõ   ró   r  r´   rR   ÚFileNotFoundErrorÚNotADirectoryErrorÚOSErrorÚerrnoÚELOOPÚEMLINKrª  r«  Ú_lookup_treerb  r  rg   rK   r¶   ÚstatÚS_ISREGra   r%   Údata)r�   rf  rh  ri  rõ   rd  ÚeÚtree_idrì  r  rî   ÚblobÚsources                r‘   Ú__call__Ú_GitAttributesLoader.__call__Ü  s­  € ÷ 	Pà×ÑÑ*Ü—7‘7—<’<Ø×#Ñ#ðÜ&(§k¢k°'Ó&:×&@Ñ&@ÀÓ&EðØGWòˆDðÜ& tÓ,�ò Ù9Ù,¨QÓ/°ó÷ ‘Qð
 ×#Ñ# GÓ,ˆØ‰?ØˆIØ×!Ñ! 'Ñ*ˆÜ˜$¤×%Ñ%Ü˜wÓ'Ð'ð	ØÐ.Ñ/‰IˆDô �|Š|˜D×!Ñ!ØˆIØ×!Ñ! #Ñ&ˆÜ˜$¤×%Ñ%ØˆIÞ18�Ð-Ò-Ð>OˆÙ-Ù ¤¨¯©Ó!3Ó4°fó
ð 	
÷+ •Qûô &Ô'9Ð:ó ÙÜó KØ—7‘7¤5§;¡;´·±Ð"=Ó=ØÜ—‘ÐCÀT×JÒJûðKûô$ ó 	ØŠIð	ús=   Á'E Á4EÃG Å
EÅG	Å0	G	Å9AGÇG	ÇGÇGc                 ó~  •  U R                   U   $ ! [         a     Of = fUR                  S5      u  p#nU R                  U5      nS nUbd  U R                  U   n[        U[        5      (       d  [        U5      e Xt   u  p‰[        R                  " U5      (       a  U	nO! [         a     Of = fX`R                   U'   U$ )Nó   /)
rd  r¶   Ú
rpartitionrt  rb  r  rg   rK   ru  ÚS_ISDIR)
r�   rf  Úparentr€  r¹   Ú	parent_idry  Úparent_treer  rî   s
             r‘   rt  Ú!_GitAttributesLoader._lookup_tree  sË   € ð	Ø—;‘;˜wÑ'Ð'øÜó 	Ùð	úà!×,Ñ,¨TÓ2‰ˆ�4Ø×%Ñ% fÓ-ˆ	ØˆØÑ Ø×,Ñ,¨YÑ7ˆKÜ˜k¬4×0Ñ0Ü" 9Ó-Ð-ð"Ø'Ñ-‘	�ô
 —<’< ×%Ñ%Ø!�Gùô ó Ùðúð  '�‰�GÑØˆs   ‚ ‘
�Á;B Â
B,Â+B,)rb  rd  rc  )r–   r—   r˜   r™   rš   r›   rc   r’   r  r|  rt  rœ   r�   r”   r‘   r_  r_  Ê  sl   † ñð	@à'ð	@ð ˜T‘zð	@ð ˜‰oð		@ð
 
ô	@ð)
Øð)
à	?ô)
ðV Eð ¨h¸©o÷ r”   r_  c                   ó^  • \ rS rSr% Sr\\S'   \\S'   \\S'   S\S'   S\S	'      SfS
S
S
S
S
S
S.S\\	-  \
R                  \   -  S
-  S\S
-  S\S
-  S\\	-  \
R                  \   -  S
-  S\\	-  \
R                  \   -  S
-  S\\	-  \
R                  \   -  S
-  S\\	-  \
R                  \   -  S
-  SSS\\	-  \
R                  \   -  S
-  SS
4S jjjrSgS jrS\	S\	S\	S\	S
-  S\S
-  S\S
-  S\	SS
4S jrS\	S\4S jrS\	S\\R(                  S
S
4   4S  jr\ ShS
S!S".S#\\	-  \
R                  \   -  S$SS%\SS 4S& jjj5       rS\4S' jrS\4S( jrS\4S) jrS\4S* jr  SiS+ jrS\S,\	SS
4S- jrS\SS
4S. jr SjS\\	-  S/\S
-  S\S
-  4S0 jjr S\4S1 jr!SjSkS4 jjr"S\4S5 jr#S!S6S7S
S
S
S
S
S8.S9\\	-  \
R                  \   -  S:\S\S;\	S<\S
-  S=\	S
-  S>\$\/S
4   S
-  S?\S
-  S@\S
-  SS 4SA jjr%S\&\SB4   4SC jr'SlSD jr(SlSE jr)SmSF jr*S\	S
-  4SG jr+S\4SH jr,SI\	SS
4SJ jr-\       SnS\\	-  \
R                  \   -  S\\	-  \
R                  \   -  S\S\S
-  S2SKSL\	S
-  S@\S
-  SM\S
-  SN\\-  S
-  SO\S
-  SS 4SP jj5       r.\S6S
S
S
S
S
S
SQ.S\\	-  \
R                  \   -  S:\S2SKSL\	S
-  S@\S
-  SM\S
-  SN\\-  S
-  SO\S
-  SS 4SR jj5       r/\   SoS\\	-  \
R                  \   -  SSS ST\S
-  S:\SU\SS 4SV jj5       r0\S6S
S
S
S
S
S
SW.S\\	-  \
R                  \   -  S:\S\S
-  S2SKSL\	S
-  SM\S
-  SN\\-  S
-  SO\S
-  SS 4SX jj5       r1\1r2SpSY jr3S\44SZ jr5S[\6\7   S
-  S\\7S
-  S]\8S
-  SS
4S^ jr9S\&\	\&\	\	4   4   4S_ jr: SqS2S3S`\	S
-  SSa4Sb jjr;SjS`\	S
-  SSc4Sd jjr<Ser=g
)rr   i  aW  A git repository backed by local disk.

To open an existing repository, call the constructor with
the path of the repository.

To create a new repository, use the Repo.init class method.

Note that a repository object may hold on to resources such
as file handles for performance reasons; call .close() to free
up those resources.

Attributes:
  path: Path to the working copy (if it exists) or repository control
    directory (if the repository is bare). ``core.worktree`` overrides
    this, so it is not necessarily the parent of the control directory.
  bare: Whether this is a bare repository
rõ   rN  r=  úFilterContext | NoneÚfilter_contextz
str | NoneÚ_index_file_overrideN)Ú
controldirr„   ÚworktreeÚobject_directoryÚ
alternatesÚ
index_fileÚrootrŠ  r„   r‹  rŒ  r�  z'Iterable[str | os.PathLike[str]] | NonerŽ  r�   c          
      óê  • UGc  Uc  [        S5      e[        R                  " U5      n[        U[        5      (       a  [        R
                  " U5      n[        R                  R                  U[        5      n
Ub  SnUGc  [        R                  R                  U
5      (       dF  [        R                  R                  [        R                  R                  U
[        5      5      (       a  SnO±[        R                  R                  [        R                  R                  U[        5      5      (       aI  [        R                  R                  [        R                  R                  U[        5      5      (       a  SnO"[        SR                  " S+0 [        US9D65      eX0l        USL aq  [        R                  R                  U
5      (       aF  [#        U
S5       n[%        U5      nSSS5        [        R                  R                  UW5      U l        OÅX l        O¾Xl        O·[        R                  " U5      n[        U[        5      (       a  [        R
                  " U5      nX@l        Uc  Ub  [        R                  " U5      OUnO[        R                  " U5      n[        U[        5      (       a  [        R
                  " U5      nUb  SnUc  SnX0l        Ub–  [        R                  " U5      n[        U[        5      (       a  [        R
                  " U5      n[        R                  R)                  U5      (       d*  [        R                  R                  U R&                  U5      nXÐl        O™U R-                  [.        5      nUbp  U   [        R                  R                  U R1                  5       [        R
                  " UR3                  5       R5                  S5      5      5      U l        SSS5        OU R&                  U l        Xl        UbG  [        R                  " U5      n[        U[        5      (       a  [        R
                  " U5      nXðl        U	bI  [        R                  " U	5      n[        U[        5      (       a  [        R
                  " U5      nUU l        OSU l        [9        U R;                  5       U R&                  U R<                  S	9U l        S
SK J!n  U" U 5      U l"        U RG                  5       n URI                  SS5      nUc  SO
[K        U5      nUS;  a  [O        U5      e URI                  SS5      nUbp  URQ                  SSS5      (       a  [S        S5      eSU l        UcC  [        R                  R                  U R&                  [        R
                  " U5      5      U l        SnURU                  S5       Hn  u  nnURW                  5       S:X  a&  US:X  a  SnM$  [Y        SUR[                  5        35      eURW                  5       S;  d  MV  [Y        UR[                  S5      5      e   Uc¬   URI                  SS5      n[]        U5      nUbB  [        R                  " U5      n[        U[        5      (       a  [        R
                  " U5      nO2[        R                  R                  U R;                  5       [        5      n[^        R`                  " UUUUS9nU(       a.  S
SK1J2n  U" U R;                  5       5      U l        U" U 5      U l"        [f        Ri                  XU R>                  5        U Rj                  cE  S
SK5J6nJ7n  US
:X  a0   URI                  SS5      nU" UR[                  S 5      5      U l5        OUU l5        0 U l8        U R-                  [        R                  R                  S!S"5      U R;                  5       S#9n U (       a/  U    U Rp                  Rs                  [u        U 5      5        SSS5        U R-                  S$U R;                  5       S#9n U (       a/  U    U Rp                  Rs                  [u        U 5      5        SSS5        [w        U R                  U R1                  5       5      U Rx                  S%'   [{        U R1                  5       5      U Rx                  S&'   [}        U R1                  5       5      U Rx                  S''   [        U R1                  5       5      U Rx                  S('   [�        U R1                  5       5      U Rx                  S)'   [ƒ        U R1                  5       5      U Rx                  S*'   SU lB        g! , (       d  f       GN}= f! , (       d  f       GNr= f! [L         a    Sn GNif = f! [L         a    Sn GNXf = f! [L         a    Sn GNRf = f! [L         a    UU l5         GN5f = f! , (       d  f       GNÏ= f! , (       d  f       GN�= f),aá  Open a repository on disk.

Args:
  root: Path to the repository's root. Optional if ``controldir`` is
    given, in which case ``self.path`` defaults to ``worktree`` when
    provided and to ``controldir`` otherwise. ``core.worktree`` in
    config may still override it.
  object_store: ObjectStore to use; if omitted, we use the
    repository's default object store
  bare: True if this is a bare repository.
  controldir: Explicit path to the control directory (analogous to
    ``GIT_DIR``). When set, discovery based on ``root`` is skipped.
  commondir: Explicit path to the common directory (analogous to
    ``GIT_COMMON_DIR``). Relative paths are resolved against the
    control directory.
  worktree: Explicit worktree path (analogous to ``GIT_WORK_TREE``).
    Forces the repository to be treated as non-bare.
  object_directory: Explicit path to the primary object store
    (analogous to ``GIT_OBJECT_DIRECTORY``). Overrides
    ``<common_dir>/objects``.
  alternates: Extra alternate object directory paths (analogous to
    ``GIT_ALTERNATE_OBJECT_DIRECTORIES``). Appended to any listed
    in ``objects/info/alternates``.
  index_file: Path to the index file (analogous to
    ``GIT_INDEX_FILE``). Overrides ``<controldir>/index``.
Nz)Repo() requires either root or controldirFTz%No git repository was found at {path}©rõ   ÚrbrP  ©rª  r.   )ÚWorkTreeContainerr   r!  r   rV  )s   cores   worktrees   barez,core.bare and core.worktree are incompatiblerô  s
   refstorages   reftablezrefStorage = )rõ  ó   objectformats   relativeworktreesrÄ   r  r^  )Úshared_permr�  )ÚReftableRefsContainer)ÚDEFAULT_OBJECT_FORMATrY  r•  rŸ  r‰   rè   )Úbasedirr   z
pre-commitz
commit-msgzpost-commitzpre-receiver­  zpost-receiver�   )Cr¬  r¬   Úfspathr  r  r  rõ   ró   r   ÚisfileÚisdirr	   r
   rI   rP  r:  rN  Úopenr   Ú_controldirÚisabsÚ
_commondirrl  r   rŠ  rQ  rR  r‰  rm   r„   Ú_write_reflogr€   r‹  r”  r†   r$  r®   r  r¶   r   r÷  r   rñ   r  r   r×   r   rZ   Úfrom_configÚreftabler—  r   r’   r>  r˜  rY  r@  r­  r   rW   rˆ   rS   rU   rX   rY   rV   rˆ  )!r�   r�  r=  rN  rŠ  r„   r‹  rŒ  r�  rŽ  Úhidden_pathrd  Úgitfile_pathÚcommondir_pathÚcommondir_filer`  Úindex_file_strr”  r¿   Úrepository_format_versionÚformat_versionÚconfigured_worktreeÚhas_reftable_extensionrY  rÜ   Úshared_valuer–  Úobject_dir_pathr—  r˜  rY  r>  Ú
graft_files!                                    r‘   r’   ÚRepo.__init__8  sÎ  € ðN ÒØ‰|ÜÐ KÓLÐLÜ—9’9˜T“?ˆDÜ˜$¤×&Ñ&Ü—{’{ 4Ó(�ÜŸ'™'Ÿ,™, t¬ZÓ8ˆKØÑ#Ø�ØŠ|Ü—7‘7—>‘> +×.Ñ.´"·'±'·-±-Ü—G‘G—L‘L ¬iÓ8÷3ñ 3ð !‘DÜ—W‘W—]‘]¤2§7¡7§<¡<°´iÓ#@×AÑAÄbÇgÁgÇmÁmÜ—G‘G—L‘L ¤wÓ/÷Gñ Gð  ‘Dä*Ø?×FÒFñ Ü"¨™oñóð ð ŒIØ�uŠ}Ü—7‘7—>‘> +×.Ñ.Ü˜k¨4Ô0°AÜ'3°A£˜÷ 1ä')§w¡w§|¡|°D¸,Ó'G�DÕ$à'2Õ$à#'Õ äŸš :Ó.ˆJÜ˜*¤e×,Ñ,ÜŸ[š[¨Ó4�
Ø)ÔØ‰|ð /7Ñ.B”r—y’y Ô*È
‘ä—y’y “�Ü˜$¤×&Ñ&Ü—{’{ 4Ó(�ØÑ#Ø�Ø‰|ð �ØŒIØÑ ÜŸYšY yÓ1ˆNÜ˜.¬%×0Ñ0Ü!#§¢¨^Ó!<�Ü—7‘7—=‘= ×0Ñ0Ü!#§¡§¡¨d×.>Ñ.>ÀÓ!O�Ø,�Oà!×0Ñ0´Ó;ˆNØÑ)Ú#Ü&(§g¡g§l¡lØŸ™Ó)ÜŸš N×$7Ñ$7Ó$9×$@Ñ$@ÀÓ$IÓJó'�D”O÷ $�^ð #'×"2Ñ"2�”ØŒ	ØÑÜŸIšI hÓ/ˆMÜ˜-¬×/Ñ/Ü "§¢¨MÓ :�Ø%ŒIàÑ!ÜŸYšY zÓ2ˆNÜ˜.¬%×0Ñ0Ü!#§¢¨^Ó!<�Ø(6ˆDÕ%à(,ˆDÔ%ô &Ø�N‰NÓ˜d×.Ñ.°t×7IÑ7Iñ
ˆŒ	õ
 	0á*¨4Ó0ˆŒà—‘Ó"ˆð	Ø(.¯
©
°6Ð;TÓ(UÐ%ð -Ñ4ñ äÐ2Ó3ð ð  Ó'Ü$ ^Ó4Ð4ð	'Ø"(§*¡*¨Z¸Ó"EÐð Ñ*ð
 ×!Ñ! *¨g°u×=Ñ=Ü2ØBóð ð ˆDŒIàÑô ŸG™GŸL™LØ×$Ñ$¤b§k¢kÐ2EÓ&Fó�”	ð
 "'ÐØ &§¡Ð-=Ö >ÑˆI�uØ�‰Ó  MÓ1Ø˜KÓ'Ø-1Ò*ä.°¸u¿|¹|»~Ð>NÐ/OÓPÐPØ—‘Ó"ð +õ ô
 +¨9×+;Ñ+;¸GÓ+DÓEÐEñ !?ð Ñð#Ø%Ÿz™z¨)Ð5GÓH�Ü5°lÓC�ð  Ñ+Ü"$§)¢)Ð,<Ó"=�Ü˜o¬u×5Ñ5Ü&(§k¢k°/Ó&B�Oøä"$§'¡'§,¡,¨t¯~©~Ó/?ÄÓ"K�Ü*×6Ò6ØØØ'Ø%ñ	ˆLö "Ý7á-¨d¯n©nÓ.>Ó?ˆDŒIá.¨tÓ4ˆDŒNÜ×Ñ˜$¨d¯i©iÔ8ð ×ÑÑ%ßOà Ó"ð?Ø$*§J¡JÐ/?ÀÓ$Q�MÙ):Ø%×,Ñ,¨WÓ5ó*�DÕ&ð &;�Ô"àˆÔØ×(Ñ(Ü�G‰G�L‰L˜ Ó*°D·N±NÓ4Dð )ð 
ˆ
ö ÚØ×!Ñ!×(Ñ(Ô):¸:Ó)FÔG÷ à×(Ñ(¨¸D¿N¹NÓ<LÐ(ÐMˆ
ÞÚØ×!Ñ!×(Ñ(Ô):¸:Ó)FÔG÷ ô $6°d·i±iÀÇÁÓARÓ#Sˆ�
‰
�<Ñ Ü#5°d·o±oÓ6GÓ#Hˆ�
‰
�<Ñ Ü$7¸¿¹Ó8IÓ$Jˆ�
‰
�=Ñ!Ü$7¸¿¹Ó8IÓ$Jˆ�
‰
�=Ñ!Ü.¨t¯©Ó/@ÓAˆ�
‰
�8ÑÜ%9¸$¿/¹/Ó:KÓ%Lˆ�
‰
�>Ñ"ð #ˆÕ÷} 1Ö0ú÷T $–^ûôP ó 	Ø‹Nð	ûô ó 	'Ø"&Óð	'ûôP ó #Ø"“ð#ûôF  ó ?Ø)>�D×&ð?ú÷ –ú÷ –úsy   ÇeÎA%e.Ô"f  Ô8f Ùf& Ý".f9 ß$%gà8%g#å
e+å.
e=æ fæfæf#æ"f#æ&f6æ5f6æ9gçgç
g ç#
g2c                 ó2   • SSK Jn  U" X R                  5      $ )zqGet the working tree for this repository.

Returns:
    WorkTree instance for performing working tree operations
r.   rB   )r‹  rC   rõ   )r�   rC   s     r‘   rB  ÚRepo.get_worktree;  s   € õ 	'á˜Ÿi™iÓ(Ð(r”   r²  Úold_shaÚnew_shaÚ	committerÚ	timestampÚtimezoneÚmessagec                 óT  • SSK Jn  U R                  U5      n	U R                  5       n
[        R
                  R                  U	5      n/ nUnU(       a�  [        R
                  R                  U5      (       d]  UR                  U5        [        R
                  R                  U5      nU(       a&  [        R
                  R                  U5      (       d  M]  UR                  5         U H$  n[        R                  " U5        [        Xê5        M&     Uc  U R                  5       n[        U5      n[        U5        Uc  [        [         R                   " 5       5      nUc  Sn[#        U	S5       nUR%                  U" X#XEXg5      S-   5        S S S 5        [        Xš5        g ! , (       d  f       N= f)Nr.   )Úformat_reflog_liner   ÚabrÕ   )rE   rº  Ú_reflog_pathÚ"_get_shared_repository_permissionsr¬   rõ   ÚdirnameÚexistsrò   r  ÚmkdirrQ   rû  r   r   r  Útimer�  Úwrite)r�   r²  r³  r´  rµ  r¶  r·  r¸  rº  rõ   r–  Ú
parent_dirÚpartsÚcurrentÚpartr¿   rd  s                    r‘   r¡  ÚRepo._write_reflogE  sI  € õ 	/à× Ñ  Ó%ˆð ×=Ñ=Ó?ˆô —W‘W—_‘_ TÓ*ˆ
àˆØˆÞœbŸg™gŸn™n¨W×5Ñ5Ø�L‰L˜Ô!Ü—g‘g—o‘o gÓ.ˆGö œbŸg™gŸn™n¨W×5Ó5ð 	�‰ŒÛˆDÜ�HŠH�TŒNÜ˜tÖ1ñ ð ÑØ×*Ñ*Ó,ˆFÜ)¨&Ó1ˆIÜ˜IÔ&ØÑÜœDŸIšI›KÓ(ˆIØÑØˆHÜ�$˜Ô Ø�G‰GÙ"Ø i¸Hóð ñô÷ ô 	˜4Õ-÷ Õús   Å(FÆ
F'c                 ó2  • UR                  S5      (       a  [        SUR                  5        S35      e[        U5      (       a  U R	                  5       OU R                  5       n[        R                  R                  US[        R                  " U5      5      $ )N)s   main-worktree/s
   worktrees/zrefs z are not supportedÚlogs)
rÌ   rD  r×   ru   rŠ  r„   r¬   rõ   ró   r  )r�   r²  Úbases      r‘   r¼  ÚRepo._reflog_pathv  sl   € Ø�>‰>Ð<×=Ñ=Ü%¨¨c¯j©j«l¨^Ð;MÐ&NÓOÐOä$7¸×$<Ñ$<ˆt�‰Ô À$Ç.Á.ÓBRˆÜ�w‰w�|‰|˜D &¬"¯+ª+°cÓ*:Ó;Ð;r”   c              #   óÌ   #   • SSK Jn  U R                  U5      n [        US5       nU" U5       Sh  v•N   SSS5        g N! , (       d  f       g= f! [         a     gf = f7f)z­Read reflog entries for a reference.

Args:
  ref: Reference name (e.g. b'HEAD', b'refs/heads/master')

Yields:
  reflog.Entry objects in chronological order (oldest first)
r.   )Úread_reflogr’  N)rE   rÍ  r¼  r�  rn  )r�   r²  rÍ  rõ   rd  s        r‘   rÍ  ÚRepo.read_reflog}  s\   é € õ 	(à× Ñ  Ó%ˆð	Ü�d˜DÔ! QÙ& q›>×)Ð)÷ "Ð!Ù)÷ "Õ!ûä ó 	Ùð	üsZ   ‚A$›A §A³A´A¸A Á A$ÁAÁ
AÁA ÁA$ÁA Á
A!ÁA$Á A!Á!A$T)Úceiling_dirsÚacross_filesystemÚstartrÏ  rÐ  c                ó   • Ubu  U Vs1 s Hg  n[         R                  R                  [         R                  R                  [         R                  " [         R
                  " U5      5      5      5      iMi     snO	[        5       n[         R                  R                  U5      nU(       a  SO[         R                  " U5      R                  nSn U(       d$  [         R                  R                  U5      U;   a  OSn U " U5      $ [         R
                  " U5      n[        U[        5      (       a  UR                  S5      n[        SU 35      es  snf ! [         am    [         R                  R                  U5      u  pšX–:X  a   M‚  Ub<   [         R                  " U	5      R                  nO! [         a      Mµ  f = fX·:w  a   MÁ  U	n Of = fGM  )a.  Iterate parent directories to discover a repository.

Return a Repo object for the first parent directory that looks like a
Git repository.

Args:
  start: The directory to start discovery from (defaults to '.')
  ceiling_dirs: Iterable of paths that discovery must not cross
    (analogous to ``GIT_CEILING_DIRECTORIES``). The ceiling
    directories themselves are not searched. As in git, a ceiling
    matching ``start`` itself is ignored. Entries are resolved the
    same way as the walking path, so passing either a symlinked or
    a resolved form works.
  across_filesystem: Whether to keep walking up past a filesystem
    boundary (analogous to ``GIT_DISCOVERY_ACROSS_FILESYSTEM``).
    When False, discovery stops before entering a parent directory
    that lives on a different device than ``start``.
NTFrÄ   zNo git repository was found at )r¬   rõ   ÚnormcaseÚrealpathr  rš  r%  ru  Úst_devrI   r´   rn  r  r  r×   )rÊ  rÑ  rÏ  rÐ  rì   Úceilingsrõ   Ú	start_devÚfirstÚnew_pathÚ_tailÚ
parent_devÚ	start_strs                r‘   ÚdiscoverÚRepo.discover�  s†  € ðH Ñ'ñ &óâ%�Aô —‘× Ñ ¤§¡×!1Ñ!1´"·+²+¼b¿iºiÈ»lÓ2KÓ!LÖMÙ%òô
 “ð 	ô �w‰w×Ñ Ó&ˆö .‘D´2·7²7¸4³=×3GÑ3Gˆ	ØˆØÞœRŸW™W×-Ñ-¨dÓ3°xÓ?ØØˆEð Ù˜4“yÐ ô —I’I˜eÓ$ˆ	Ü�i¤×'Ñ'Ø!×(Ñ(¨Ó1ˆIÜÐ!@ÀÀÐLÓMÐMùòIøô& $ó  Ü"$§'¡'§-¡-°Ó"5‘�ØÓ#ÚØÑ(ðÜ%'§W¢W¨XÓ%6×%=Ñ%=™
øÜ,ó ó ðúð "Ó.ÚØ’ð úò sH   ˆA.EÃ<E Å0G
ÆG
Æ
 F+Æ*G
Æ+
F:Æ5G
Æ9F:Æ:G
ÇG
Ç	G
c                 ó   • U R                   $ )z)Return the path of the control directory.)rž  rF  s    r‘   rŠ  ÚRepo.controldirÕ  s   € à×ÑÐr”   c                 ó   • U R                   $ )z¶Return the path of the common directory.

For a main working tree, it is identical to controldir().

For a linked working tree, it is the control directory of the
main working tree.
)r   rF  s    r‘   r„   ÚRepo.commondirÙ  s   € ð �‰Ðr”   c                 óT  • [         R                  R                  U R                  S5      n[        US5       nUR	                  S5        SSS5        [         R
                  " U5      n [         R                  " XR                  [        R                  -  5        [         R
                  " U5      n[         R                  " U5        UR                  UR                  :g  nUR                  [        R                  -  S:g  nU=(       a    U$ ! , (       d  f       NÆ= f! [         a     gf = f)rC  z.probe-permissionsÚwr  NFr   )r¬   rõ   ró   r�  rÂ  ÚlstatÚchmodÚst_moderu  ÚS_IXUSRÚPermissionErrorÚunlink)r�   Úfnamerd  Úst1Úst2Úmode_differsÚst2_has_execs          r‘   rE  ÚRepo._determine_file_modeã  sÑ   € ô
 —‘—‘˜TŸY™YÐ(<Ó=ˆÜ�%˜Ô Ø�G‰G�BŒK÷ ô �hŠh�u‹oˆð	Ü�HŠH�UŸK™K¬$¯,©,Ñ6Ô7ô �hŠh�u‹oˆä
�	Š	�%Ôà—{‘{ c§k¡kÑ1ˆØŸ™¤d§l¡lÑ2°qÑ8ˆà×, Ð,÷ Õûô ó 	Ùð	ús   ·D	Á(1D Ä	
DÄ
D'Ä&D'c                 ó(   • [         R                  S:g  $ rI  rJ  rF  s    r‘   rK  ÚRepo._determine_symlinksú  rM  r”   c                 ó~   •  U R                  5       nUR                  SS5      n[        U5      $ ! [         a     gf = f)zsGet the shared repository permission setting from config.

Returns:
    SharedPerm to apply, or None if not shared
r  r^  N)r$  r®   r   r¶   )r�   r¿   rÜ   s      r‘   r½  Ú'Repo._get_shared_repository_permissions  sA   € ð	Ø—_‘_Ó&ˆFØ—J‘J˜yÐ*<Ó=ˆEÜ*¨5Ó1Ð1øÜó 	Ùð	ús   ‚,/ ¯
<»<ro  c                 ó´  • UR                  [        R                  R                  5      nU R	                  5       n[        R                  R                  U R                  5       U5      nUb&  [        USUS9 nUR                  U5        SSS5        g[        US5       nUR                  U5        SSS5        g! , (       d  f       g= f! , (       d  f       g= f)rq  NÚwb)r–  )	Úlstripr¬   rõ   Úsepr½  ró   rŠ  rO   rÂ  )r�   rõ   ro  r–  Ú	full_pathrd  s         r‘   r`  ÚRepo._put_named_file  s¥   € ð �{‰{œ2Ÿ7™7Ÿ;™;Ó'ˆð ×=Ñ=Ó?ˆô —G‘G—L‘L §¡Ó!2°DÓ9ˆ	ØÑ"Ü˜ D°kÒBÀaØ—‘˜Ô!÷ CÐBô ˜ DÔ)¨QØ—‘˜Ô!÷ *Ð)÷ CÕBú÷ *Õ)ús   Á6B8ÂC	Â8
CÃ	
Cc                 óª   •  [         R                  " [         R                  R                  U R	                  5       U5      5        g ! [
         a     g f = fr9  )r¬   rê  rõ   ró   rŠ  rn  rm  s     r‘   ru  ÚRepo._del_named_file&  s;   € ð	Ü�IŠI”b—g‘g—l‘l 4§?¡?Ó#4°dÓ;Õ<øÜ ó 	Ùð	ús   ‚AA Á
AÁAr™  c                 ó:  • Uc  U R                  5       n[        U[        5      (       a  UR                  S5      nUR	                  [
        R                  R                  5      n [        [
        R                  R                  X!5      S5      $ ! [         a     gf = f)a¿  Get a file from the control dir with a specific name.

Although the filename should be interpreted as a filename relative to
the control dir in a disk-based Repo, the object returned need not be
pointing to a file in that location.

Args:
  path: The path to the file, relative to the control dir.
  basedir: Optional argument that specifies an alternative to the
    control dir.
Returns: An open file object, or None if the file does not exist.
NrÄ   r’  )rŠ  r  r  r×   r÷  r¬   rõ   rø  r�  ró   rn  )r�   rõ   r™  s      r‘   rl  ÚRepo.get_named_file,  sw   € ð& ‰?Ø—o‘oÓ'ˆGÜ�dœE×"Ñ"Ø—;‘;˜wÓ'ˆDØ�{‰{œ2Ÿ7™7Ÿ;™;Ó'ˆð	ÜœŸ™Ÿ™ WÓ3°TÓ:Ð:øÜ ó 	Ùð	ús   Á$(B Â
BÂBc                 ó˜   • U R                   b  U R                   $ [        R                  R                  U R	                  5       [
        5      $ )zReturn path to the index file.)r‰  r¬   rõ   ró   rŠ  r   rF  s    r‘   Ú
index_pathÚRepo.index_pathI  s6   € à×$Ñ$Ñ0Ø×,Ñ,Ð,Ü�w‰w�|‰|˜DŸO™OÓ-¬~Ó>Ð>r”   r¿   rw  c           	      ó*  • SSK JnJn  U R                  5       (       d  [        eUc  U R                  5       nUR                  SSS5      nSnSnU(       a2   UR                  SS5      n[        U5      nUR                  SS
S5      nO1 UR                  SS5      n[        U5      nUR                  SS
S5      nU R                  5       nU" U R                  5       UUUU" U5      U R                  S9$ ! [         a    S	n NŒf = f! [         a    Sn Nlf = f)zêOpen the index for this repository.

Args:
  config: Configuration to consult for index settings. If None,
    falls back to ``self.get_config_stack()``.

Raises:
  NoIndexPresent: If no index is present
Returns: The matching `Index`
r.   )r9   Úmake_path_normalizerNs   features	   manyFilesFs   indexs   versioné   s   skipHashT)Ú	skip_hashr(  r–  Úpath_normalizerr>  )rƒ   r9   r  Ú	has_indexrF   rû  r÷  r®   r  r¶   r½  r   r>  )	r�   r¿   r9   r  Ú
many_filesr  Úindex_versionÚindex_version_strr–  s	            r‘   ry  ÚRepo.open_indexO  s(  € ÷ 	7à�~‰~×ÑÜ Ð à‰>Ø×*Ñ*Ó,ˆFØ×'Ñ'¨
°LÀ%ÓHˆ
Øˆ	Øˆæð"Ø$*§J¡J¨x¸Ó$DÐ!Ü #Ð$5Ó 6�ð ×*Ñ*¨8°[À$ÓG‰Ið%Ø$*§J¡J¨x¸Ó$DÐ!Ü #Ð$5Ó 6�ð ×*Ñ*¨8°[À%ÓHˆIð ×=Ñ=Ó?ˆáØ�O‰OÓØØ!Ø#Ù0°Ó8Ø×,Ñ,ñ
ð 	
øô ó "Ø !’ð"ûô ó %Ø $’ð%ús$   ÁC1 ÂD Ã1D Ã?D ÄDÄDc                 ó$   • U R                   (       + $ )zCheck if an index is present.)rN  rF  s    r‘   r  ÚRepo.has_index‚  s   € ð —9‘9Œ}Ðr”   Fs   origin)rÀ  rN  ÚoriginÚcheckoutÚbranchr†  r‡  rO  Útarget_pathrÀ  r  r  r  r†  r‡  rO  c                ó‚  • [         R                  " U R                  5      n
U(       a  [         R                  " U5         U(       d  [        R                  XS9nUc  SnO'U(       a  [        S5      e[        R                  U5      n UR                  5       nUR                  SU4SU
5        UR                  SU4SSU-   S	-   5        UR                  5         S
U
-   nU R                  X¸S9  UR                  R                  [        SU-   5      U R                  R                  [        S5      5      US9  UR                  R                  [        S5      U R                  R                  [        S5      5      US9  U R                  R!                  ["        5      u  pïU(       a  US   OSnSnU(       a  U(       d  XûR                  ["        '   UnOr[%        UR                  UU5        ['        UR                  UUXm5      nU(       a:  [)        UR                  UU5      nU(       d  [+        UR                  5       UU5        OSnU(       a.  Ub+  UR-                  5       R/                  UR1                  5       S9  U$ ! [2         a    UR5                  5         e f = f! [2         a    U(       a  SSKnUR9                  U5        e f = f)a+  Clone this repository.

Args:
  target_path: Target path
  mkdir: Create the target directory
  bare: Whether to create a bare repository
  checkout: Whether or not to check-out HEAD after cloning
  origin: Base name for refs in target repository
    cloned from this repository
  branch: Optional branch or tag to be used as HEAD in the new repository
    instead of this repository's HEAD.
  progress: Optional progress function
  depth: Depth at which to fetch
  symlinks: Symlinks setting (default to autodetect)
Returns: Created repository as `Repo`
)rO  NTz"checkout and bare are incompatibles   remotes   urls   fetchs   +refs/heads/*:refs/remotes/s   /*s   clone: from )r‡  s   refs/remotes/rÁ  )r¸  s	   refs/tagsrÉ   ©r¿   r   )r¬   Úfsencoderõ   rÀ  r   ÚinitrÖ   Ú	init_barer$  r%  r&  r�  r€   Úimport_refsrn   rÂ  r  rk   rs   rq   rr   rp   rB  Úreset_indexrû  ÚBaseExceptionÚcloseÚshutilÚrmtree)r�   r  rÀ  rN  r  r  r  r†  r‡  rO  Úencoded_pathr„  Útarget_configÚref_messageÚ
head_chainÚ
origin_shaÚorigin_headrÈ  Úhead_refr  s                       r‘   ÚcloneÚ
Repo.cloneˆ  si  € ô: —{’{ 4§9¡9Ó-ˆæÜ�HŠH�[Ô!ð@	ÞÜŸ™ ;˜ÐB�ØÑ#Ø#�HøæÜ$Ð%IÓJÐJÜŸ™¨Ó4�ð0Ø &× 1Ñ 1Ó 3�Ø×!Ñ! 9¨fÐ"5°v¸|ÔLØ×!Ñ!Ø Ð'ØØ2°VÑ;¸eÑCôð
 ×+Ñ+Ô-à-°Ñ<�Ø—
‘
˜6�
Ñ/Ø—‘×'Ñ'ÜÐ(¨6Ñ1Ó2Ø—I‘I×%Ñ%¤c¨-Ó&8Ó9Ø'ð (ñ ð
 —‘×'Ñ'Ü˜Ó%Ø—I‘I×%Ñ%¤c¨,Ó&7Ó8Ø'ð (ñ ð *.¯©×)9Ñ)9¼'Ó)BÑ&�
Þ0:˜j¨šnÀ�Ø(,�Þ¦kà+5—K‘K¤Ñ(Ø%‘Dä$ V§[¡[°&¸+ÔFÜ2ØŸ™ V¨[¸&ó �Hö
  Ü(¨¯©°hÀÓL˜Þ#Ü0°×1BÑ1BÓ1DÀhÐPVÔWøà#˜æ Ñ 0Ø×'Ñ'Ó)×5Ñ5¸V×=TÑ=TÓ=VÐ5ÑWð ˆøô !ó Ø—‘”Øðûô ó 	ÞÛà—‘˜kÔ*Øð	ús   ¿AJ ÂG.I7 É7JÊJ Ê(J>r2   c                 óª   ^ ^^^• SSK Jm  SSKJnJm  SS[
        S[        S[        4UU 4S jjjmS[
        S[        4UU 4S	 jjnUU4S
 jU4S jS.nU$ )zjGet condition matchers for includeIf conditions.

Returns a dict of condition prefix to matcher function.
r   )ÚPathr.   )r2   Úmatch_glob_patternÚpatternÚcase_sensitiver�   c                 ó  >• U R                  S5      (       a  g [        T" TR                  5      R                  5       5      n[        R                  R                  U 5      n U R                  SS5      n U R                  S5      (       d  [        U 5      S:¼  a
  U S   S:X  a  OS	U -   n U R                  S5      (       a  U S
-   n SSKJn  U R                  SSS9nUR                  SSS9nU" XTU(       + S9$ ! [        [
        4 a     gf = f)zªMatch gitdir against a pattern.

Args:
  pattern: Pattern to match against
  case_sensitive: Whether to match case-sensitively

Returns:
  True if gitdir matches pattern
ú./FÚ\rj  )z~/r,  rj  ú**rå   r.   Ú:z**/r.  )Ú_match_gitdir_patternrÄ   rÓ   r
  )Ú
ignorecase)rÌ   r›   rž  Úresolverp  rÖ   r¬   rõ   Ú
expanduserrÓ   rç   rÍ   r¿   r0  rË   )r)  r*  Ú	repo_pathr0  Úpattern_bytesÚrepo_path_bytesr'  r�   s         €€r‘   Úmatch_gitdirÚ9Repo._get_config_condition_matchers.<locals>.match_gitdir÷  s  ø€ ð ×!Ñ! $×'Ñ'àðÜ¡ T×%5Ñ%5Ó 6× >Ñ >Ó @ÓA�	ô
 —g‘g×(Ñ(¨Ó1ˆGð —o‘o d¨CÓ0ˆGØ×%Ñ%Ð&=×>Ñ>ä�w“< 1Ó$¨°©°sÓ):Øà# g™o�GØ×Ñ ×$Ñ$Ø! D™.�õ 6à#ŸN™N¨7¸9˜NÐEˆMØ'×.Ñ.¨w¸yÐ.ÐIˆOá(Ø¸~Ô;Mñð øô/ œZÐ(ó Ùðús   š)C5 Ã5DÄDc                 óð   >•  TR                   R                  [        5      u  pUS   nU(       a7  UR                  S5      (       a!  [	        U5      R                  SSS9nT" X@5      $ g! [         a     gf = f)z†Match current branch against a pattern.

Args:
  pattern: Pattern to match against

Returns:
  True if current branch matches pattern
rÉ   s   refs/heads/rÄ   rÓ   r
  F)r€   r  rk   rÌ   rt   r×   r¶   )r)  Ú	ref_chainr€  r#  r  r(  r�   s        €€r‘   Úmatch_onbranchÚ;Repo._get_config_condition_matchers.<locals>.match_onbranch%	  s…   ø€ ð?à#Ÿy™y×/Ñ/´Ó8‘�	Ø$ R™=�ö  × 3Ñ 3°N× CÑ Cä0°Ó:×AÑAØ¨	ð Bð �Fñ .¨fÓ>Ð>Øøô ó Øð ðús   ƒ&A( Á(
A5Á4A5c                 ó   >• T" U S5      $ )NTr�   ©r)  r7  s    €r‘   r  Ú5Repo._get_config_condition_matchers.<locals>.<lambda>?	  s   ø€ ¡|°G¸TÔ'Br”   c                 ó   >• T" U S5      $ )NFr�   r>  s    €r‘   r  r?  @	  s   ø€ ©°g¸uÔ)Er”   )z	onbranch:zgitdir:z	gitdir/i:)T)Úpathlibr'  r¿   r2   r(  r›   r  )r�   r2   r;  Úmatchersr'  r7  r(  s   `   @@@r‘   Ú_get_config_condition_matchersÚ#Repo._get_config_condition_matchersí  s\   û€ õ
 	!ç@ñ+	¤#ð +	´tð +	Ät÷ +	ñ +	ð\	¤Cð 	¬D÷ 	ð 	ð2 (ÜBÜEñ1
ˆð ˆr”   c                 óê   • SSK Jn  [        R                  R	                  U R                  5       S5      n U R                  5       nUR                  " X#S9$ ! [         a    U" 5       nX$l        Us $ f = f)zXGet the worktree-specific config.

Returns:
  ConfigFile object for the worktree config
r.   rS  zconfig.worktree©Úcondition_matchers)	r¿   r4   r¬   rõ   ró   r„   rC  Ú	from_pathrn  )r�   r4   rõ   rG  re  s        r‘   rÞ  ÚRepo.get_worktree_configE	  sh   € õ 	'ä�w‰w�|‰|˜DŸN™NÓ,Ð.?Ó@ˆð	à!%×!DÑ!DÓ!FÐØ×'Ò'¨ÑTÐTøÜ ó 	Ù“ˆBØŒGØŠIð	ús   ¶A ÁA2Á1A2c                 óâ   • SSK Jn  [        R                  R	                  U R
                  S5      n U R                  5       nUR                  " X#S9$ ! [         a    U" 5       nX$l        Us $ f = f)rÛ  r.   rS  r¿   rF  )	r¿   r4   r¬   rõ   ró   r   rC  rH  rn  )r�   r4   rõ   rG  rÑ  s        r‘   r$  ÚRepo.get_configW	  sd   € õ
 	'ä�w‰w�|‰|˜DŸO™O¨XÓ6ˆð	à!%×!DÑ!DÓ!FÐØ×'Ò'¨ÑTÐTøÜ ó 	Ù“,ˆCØŒHØŠJð	ús   ²A ÁA.Á-A.c                 óz   • SSK nSSKJn  UR                  R	                  U R                  5       S5      nU" U5      $ )zhGet the appropriate rebase state manager for this repository.

Returns: DiskRebaseStateManager instance
r   Nr.   )ÚDiskRebaseStateManagerzrebase-merge)r¬   ÚrebaserM  rõ   ró   rŠ  )r�   r¬   rM  rõ   s       r‘   rê  ÚRepo.get_rebase_state_managerh	  s0   € ó
 	å2à�w‰w�|‰|˜DŸO™OÓ-¨~Ó>ˆÙ% dÓ+Ð+r”   c                 óæ   • [         R                  R                  U R                  S5      n [	        US5       nUR                  5       sSSS5        $ ! , (       d  f       g= f! [         a     gf = f)zURetrieve the description of this repository.

Returns: Description as bytes or None.
rT  r’  N)r¬   rõ   ró   rž  rO   rQ  rn  )r�   rõ   rd  s      r‘   rá  ÚRepo.get_descriptiont	  sU   € ô
 �w‰w�|‰|˜D×,Ñ,¨mÓ<ˆð	Ü˜˜tÔ$¨Ø—v‘v“x÷ %×$×$ûä ó 	Ùð	ús.   ¬A# ¸AÁ	A# Á
A ÁA# Á A# Á#
A0Á/A0c                 ó$   • SU R                   < S3$ )z0Return string representation of this repository.z	<Repo at Ú>r‘  rF  s    r‘   Ú__repr__ÚRepo.__repr__€	  s   € à˜4Ÿ9™9™- qÐ)Ð)r”   rT  c                 ó(   • U R                  SU5        g)rå  rT  N)r`  rç  s     r‘   ræ  ÚRepo.set_description„	  s   € ð 	×Ñ˜]¨KÕ8r”   zStackedConfig | NoneÚdefault_branchrP  rQ  r>  c                 ól  • [         R                  " U5      n[        U[        5      (       a  [         R                  " U5      n[         R                  " U5      n[        U[        5      (       a  [         R                  " U5      nS nU	b  [        U	5      n[         HE  n[         R                  R                  " U/UQ76 n[         R                  " U5        [        XÛ5        MG     SSKJn  U" U
5      nUc8  [        R                  " [         R                  R                  U[        5      UUS9nU " XUS9nUc-  Uc  SSKJn  UR$                  " 5       n UR'                  SS5      nUR,                  R/                  [0        [3        U5      5        UR5                  UUUU	U
S9  U$ ! [(         a	    [*        n NPf = f)	Nr.   rX  )r–  r>  )rN  r=  )r5   r  ÚdefaultBranch)rN  rO  rP  rQ  r>  )r¬   rš  r  r  r  r   r   rõ   ró   rÀ  rQ   r>  rY  rZ   r  r	   r¿   r5   Údefaultr®   r¶   r   r€   Úset_symbolic_refrk   rv   rf  )rÊ  rõ   rŠ  rN  r=  r¿   rX  rO  rP  rQ  r>  r–  ÚdÚdir_pathrY  Úhash_algrÑ  r5   s                     r‘   Ú_init_maybe_bareÚRepo._init_maybe_bareŒ	  sy  € ô �yŠy˜‹ˆÜ�dœE×"Ñ"Ü—;’;˜tÓ$ˆDÜ—Y’Y˜zÓ*ˆ
Ü�j¤%×(Ñ(ÜŸš ZÓ0ˆJð *.ˆØÑ(Ü1Ð2CÓDˆK÷ "ˆAÜ—w‘w—|’| JÐ3°Ò3ˆHÜ�HŠH�XÔÜ˜xÖ5ñ "õ 	5á$ ]Ó3ˆàÑÜ*×/Ò/Ü—‘—‘˜Z¬Ó3Ø'Ø&ñˆLñ
 �$°Ñ=ˆØÑ!Ø‰~Ý1à&×.Ò.Ó0�ð0Ø!'§¡¨F°OÓ!D�ð 	�‰×!Ñ!¤'Ô+<¸^Ó+LÔMØ�‰ØØØØ/Ø'ð 	ñ 	
ð ˆ
øô ó 0Ü!/’ð0ús   ÅF  Æ F3Æ2F3)rÀ  r¿   rX  rO  rP  rQ  r>  c                óv  • [         R                  " U5      n[        U[        5      (       a  [         R                  " U5      nU(       a  [         R
                  " U5        [         R                  R                  U[        5      n	[         R
                  " U	5        [        U	5        U R                  UU	SUUUUUUS9	$ )aÎ  Create a new repository.

Args:
  path: Path in which to create the repository
  mkdir: Whether to create the directory
  config: Configuration object
  default_branch: Default branch name
  symlinks: Whether to support symlinks
  format: Repository format version (defaults to 0)
  shared_repository: Shared repository setting (group, all, umask, or octal)
  object_format: Object format to use ("sha1" or "sha256", defaults to "sha1")
Returns: `Repo` instance
F)r¿   rX  rO  rP  rQ  r>  )r¬   rš  r  r  r  rÀ  rõ   ró   r   r  r`  )
rÊ  rõ   rÀ  r¿   rX  rO  rP  rQ  r>  rŠ  s
             r‘   r  Ú	Repo.initË	  s•   € ô4 �yŠy˜‹ˆÜ�dœE×"Ñ"Ü—;’;˜tÓ$ˆDÞÜ�HŠH�TŒNÜ—W‘W—\‘\ $¬
Ó3ˆ
Ü
�Š�ÔÜ˜zÔ*Ø×#Ñ#ØØØØØ)ØØØ/Ø'ð $ð 

ð 
	
r”   Ú	main_repoÚ
identifierÚrelative_pathsc                 óf  • [         R                  " U5      n[        U[        5      (       a  [         R                  " U5      nU(       a  [         R
                  " U5        Uc  [         R                  R                  U5      n[         R                  R                  UR                  5       5      n[         R                  R                  U[        5      n[         R                  R                  Xs5      n[         R                  R                  [         R                  R                  U[        5      5      n	SSKJn
  U
" UU[         R                  R                  U	5      U5      n[!        U	S5       nUR#                  S[         R$                  " U5      -   S-   5        SSS5        UR'                  5       n [         R
                  " U5        [)        X}5         [         R
                  " U5        [)        X�5        U
" X)X…5      n[!        [         R                  R                  U[,        5      S5       nUR#                  [         R$                  " U5      S-   5        SSS5        [!        [         R                  R                  U[.        5      S5       nUR#                  S5        SSS5        [!        [         R                  R                  US5      S5       nUR#                  UR1                  5       S-   5        SSS5        U " [         R                  R3                  U5      5      nUR5                  5       R7                  UR9                  5       S	9  U$ ! , (       d  f       GNº= f! [*         a     GN˜f = f! [*         a     GN‡f = f! , (       d  f       GN2= f! , (       d  f       Nû= f! , (       d  f       N·= f)
aD  Create a new working directory linked to a repository.

Args:
  path: Path in which to create the working tree.
  main_repo: Main repository to reference
  identifier: Worktree identifier
  mkdir: Whether to create the directory
  relative_paths: Whether to use relative paths for gitdir references
Returns: `Repo` instance
Nr.   )Ú_compute_gitdir_pathrö  rO  rÕ   s   ../..
ÚHEADr  )r¬   rš  r  r  r  rÀ  rõ   ÚbasenameÚabspathrŠ  ró   r   r   r‹  rh  r¾  r�  rÂ  r  r½  rQ   ÚFileExistsErrorr   r   rÈ  ÚnormpathrB  r  rû  )rÊ  rõ   rd  re  rÀ  rf  Úmain_controldirÚmain_worktreesdirÚworktree_controldirÚgitdirfile_absrh  Ú
gitdir_refrd  r–  Úgitdir_pathÚrs                   r‘   Ú_init_new_working_directoryÚ Repo._init_new_working_directoryù	  s—  € ô& �yŠy˜‹ˆÜ�dœE×"Ñ"Ü—;’;˜tÓ$ˆDÞÜ�HŠH�TŒNØÑÜŸ™×)Ñ)¨$Ó/ˆJäŸ'™'Ÿ/™/¨)×*>Ñ*>Ó*@ÓAˆÜŸG™GŸL™L¨¼)ÓDÐÜ Ÿg™gŸl™lÐ+<ÓIÐÜŸ™Ÿ™¬¯©¯©°d¼JÓ)GÓHˆõ 	3á)ØØÜ�G‰G�O‰O˜NÓ+Øó	
ˆ
ô �. $Ô'¨1Ø�G‰G�K¤"§+¢+¨jÓ"9Ñ9¸EÑAÔB÷ (ð  ×BÑBÓDˆð	Ü�HŠHÐ&Ô'ÜÐ0Ô>ð	Ü�HŠHÐ(Ô)ÜÐ2Ô@ñ
 +ØÐ':ó
ˆô ”"—'‘'—,‘,Ð2´FÓ;¸TÔBÀaØ�G‰G”B—K’K Ó,¨uÑ4Ô5÷ Cä”"—'‘'—,‘,Ð2´IÓ>ÀÔEÈØ�G‰G�JÔ÷ Fä”"—'‘'—,‘,Ð2°FÓ;¸TÔBÀaØ�G‰G�I—N‘NÓ$ uÑ,Ô-÷ Cá”—‘× Ñ  Ó&Ó'ˆØ	�‰Ó×$Ñ$¨A×,>Ñ,>Ó,@Ð$ÑAØˆ÷? (Ö'ûô ó 	Úð	ûô
 ó 	Úð	ú÷ CÖBúçEÕEúçBÕBúsT   Å,,MÆ1!M Ç!M. È+)M?Ê
NË#N"Í
MÍ
M+Í*M+Í.
M<Í;M<Í?
NÎ
NÎ"
N0)rÀ  r=  r¿   rX  rP  rQ  r>  c                óì   • [         R                  " U5      n[        U[        5      (       a  [         R                  " U5      nU(       a  [         R
                  " U5        U R                  UUSUUUUUUS9	$ )a  Create a new bare repository.

``path`` should already exist and be an empty directory.

Args:
  path: Path to create bare repository in
  mkdir: Whether to create the directory
  object_store: Object store to use
  config: Configuration object
  default_branch: Default branch name
  format: Repository format version (defaults to 0)
  shared_repository: Shared repository setting (group, all, umask, or octal)
  object_format: Object format to use ("sha1" or "sha256", defaults to "sha1")
Returns: a `Repo` instance
T)r=  r¿   rX  rP  rQ  r>  )r¬   rš  r  r  r  rÀ  r`  )	rÊ  rõ   rÀ  r=  r¿   rX  rP  rQ  r>  s	            r‘   r  ÚRepo.init_bareE
  sm   € ô8 �yŠy˜‹ˆÜ�dœE×"Ñ"Ü—;’;˜tÓ$ˆDÞÜ�HŠH�TŒNØ×#Ñ#ØØØØ%ØØ)ØØ/Ø'ð $ð 

ð 
	
r”   c                 ó–   • U R                   R                  5         U R                  b"  U R                  R                  5         SU l        gg)z*Close any files opened by this repository.N)r=  r  rˆ  rF  s    r‘   r  Ú
Repo.closet
  s?   € à×Ñ×ÑÔ!à×ÑÑ*Ø×Ñ×%Ñ%Ô'Ø"&ˆDÕð +r”   c                 ó   • U $ )zEnter context manager.r�   rF  s    r‘   Ú	__enter__ÚRepo.__enter__|
  s   € àˆr”   Úexc_typeÚexc_valÚexc_tbc                 ó$   • U R                  5         g)z*Exit context manager and close repository.N)r  )r�   r~  r  r€  s       r‘   Ú__exit__ÚRepo.__exit__€
  s   € ð 	�
‰
�r”   c                 óì  • 0 n[         R                  R                  U R                  S5      n [        U5      nU   U H­  nUR                  5       nU(       a  UR                  S5      (       a  M2  UR                  5       n[        U5      S:  a  MS  US   n0 nUSS  HF  n	U	R                  S5      (       a	  S	X‰SS '   M"  S
U	;   a  U	R                  S
S5      u  p«X¸U
'   MB  SX‰'   MH     X�U'   M¯     SSS5        U$ ! [         a    Us $ [
         aQ  nUR                  [        R                  [        R                  4;  a  e [        R                  SU5        Us SnA$ SnAff = f! , (       d  f       U$ = f)zÎRead .gitattributes file from working tree.

A ``.gitattributes`` that is a symlink is skipped with a warning
rather than followed, as git does.

Returns:
    Dictionary mapping file patterns to attributes
rk  rl  Nó   #rå   r   r.   ó   -s   falseó   =s   true)r¬   rõ   ró   rR   rn  rp  rq  rr  rs  rª  r«  rÞ   rÌ   r´   rç   )r�   ÚgitattributesÚgitattributes_pathrd  rx  ré   rÄ  r)  rm  ÚattrÚkeyrÜ   s               r‘   Ú_read_gitattributesÚRepo._read_gitattributes‰
  sW  € ð :<ˆÜŸW™WŸ\™\¨$¯)©)Ð5EÓFÐð	!Ü"Ð#5Ó6ˆAò Û�Ø—z‘z“|�Þ˜tŸ™¨t×4Ñ4ÙàŸ
™
›�Ü�u“: “>Ùà ™(�Ø�à! ! "›I�DØ—‘ t×,Ñ,à*2˜ 1 2˜h›Ø ›à%)§Z¡Z°°aÓ%8™
˜Ø%*˜c›
ð '.˜›ñ &ð */˜gÓ&ñ1 ÷ ð6 ÐøôE !ó 	!Ø Ò Üó 	!Ø�w‰wœuŸ{™{¬E¯L©LÐ9Ó9ØÜ�N‰NÐ?ÐASÔTØ Õ ûð		!ú÷
 ŒQð6 Ðús0   ®C9 »B4E$Ã9E!Ä	E!ÄAEÅE!ÅE!Å$
E3rì  r7   c                 óü   • SSK JnJnJn  Uc  U R	                  5       nU R                  U5      nU R                  c  U" X5      nU" U5      U l        OU R                  R                  U5        U" XX R                  S9$ )zþReturn a BlobNormalizer object.

Args:
  config: Configuration to consult for filter setup. If None,
    falls back to ``self.get_config_stack()``.
  tree: Tree to read .gitattributes from, e.g. the tree being
    checked out. See ``get_gitattributes``.
r.   ©r7   r8   ÚFilterRegistry©r'  rˆ  ©Úfiltersr7   r8   r�  rû  rñ  rˆ  Úrefresh_config©r�   r¿   rì  r7   r8   r�  Úgit_attributesÚfilter_registrys           r‘   rî  ÚRepo.get_blob_normalizer»
  s�   € ÷ 	QÑPà‰>Ø×*Ñ*Ó,ˆFØ×/Ñ/°Ó5ˆð ×ÑÑ&Ù,¨VÓ:ˆOÙ"/°Ó"@ˆDÕð ×Ñ×.Ñ.¨vÔ6á#Ø¨×>QÑ>Qñ
ð 	
r”   r0   c                 óâ  • SSK JnJn  USL =(       a    U R                  (       + nUcª   U S   n[	        U[
        5      (       a6  UR                  u  pgU R                  U5      n[	        U[
        5      (       a  M6  [	        U[        5      (       d8  [        S[        U5      R                   S[        U5      R                   S35      eUR                  n[        R                  R!                  U R#                  5       SS	5      n U" U5      n	['        U R(                  U(       a  U R                  OSUc  SO
[+        U5      5      n
U" U
" S
5      X©S9$ ! [         a     N‰f = f! [$         a    / n	 Ncf = f)a3  Read gitattributes for the repository.

As in git, the ``.gitattributes`` of every directory applies to the
paths below it, with deeper files taking precedence and
``$GIT_DIR/info/attributes`` taking precedence over all of them.
Subdirectory files are read when a path below them is first matched.

Args:
    tree: Tree SHA to read .gitattributes from. If not given, each
      ``.gitattributes`` is read from the working tree, falling back
      to the HEAD tree when the working tree has none.

Returns:
    GitAttributes object that can be used to match paths
r.   )r0   Úparse_gitattributes_fileNr   z(Expected HEAD to point to a Commit, got z&. This usually means HEAD points to a r3  r‰   Ú
attributesr”   )Údirectory_loaderÚinfo_patterns)rm  r0   rš  rN  r  rf   ÚobjectrÎ  rb   rÖ   r5  r–   rì  r¶   r¬   rõ   ró   rŠ  rn  r_  r=  rc   )r�   rì  r0   rš  Úread_worktreerÈ  Ú_clsr6  Úinfo_attrs_pathr�  Úloaders              r‘   rñ  ÚRepo.get_gitattributesØ
  s\  € ÷  	Cð
  ˜×6¨T¯Y©Y¬ˆØ‰<ðØ˜G‘}�ä  ¤s×+Ñ+Ø $§¡‘I�DØŸ?™?¨3Ó/�Dô ! ¤s×+Ó+ô " $¬×/Ñ/Ü$ØBÄ4ÈÃ:×CVÑCVÐBWð X?Ü?CÀD»z×?RÑ?RÐ>Sð T/ð0óð ð
 —y‘y�ô
 Ÿ'™'Ÿ,™, t§¡Ó'8¸&À,ÓOˆð	Ù4°_ÓEˆMô &Ø×ÑÞ&ˆD�IŠI¨DØ‘L‰D¤h¨t£nó
ˆñ
 Ù�3‹K¨&ñ
ð 	
øô ó áðûô !ó 	ØŠMð	ús+   ©AE Á9AE ÄE Å
EÅEÅE.Å-E.)
r   rž  r@  r‰  rN  rˆ  r>  rõ   r€   r†   rF  rK  )Ú.)r�   r  r9  rE  rG  rH  )NNNNNNN)NFF©r�   NrI  )>r–   r—   r˜   r™   rš   r›   Ú__annotations__r  rZ   r  r¬   ÚPathLiker^   r’   rB  r  r¡  r¼  r    rE   ÚEntryrÍ  ÚclassmethodrÝ  rŠ  r„   rE  rK  r½  r`  ru  r)   rl  r   ry  r  r   r$  r:  rC  rÞ  r$  rê  rá  rT  ræ  r`  r  ru  r  Úcreater  r-   r|  r5  r  r&   r‚  rŒ  rî  rñ  rœ   r�   r”   r‘   r   r     s™  ‡ ñð$ ƒIØ
ƒJØ!Ó!Ø*Ó*Ø&Ó&ð 7;Ø48Ø ð	A#ð =AØ;?Ø:>ØBFØ@DØ<@òA#à�E‰k˜BŸK™K¨Ñ,Ñ,¨tÑ3ðA#ð +¨TÑ1ðA#ð �T‰kð	A#ð ˜%‘K "§+¡+¨cÑ"2Ñ2°TÑ9ðA#ð ˜‘; §¡¨SÑ!1Ñ1°DÑ8ðA#ð ˜‘+ §¡¨CÑ 0Ñ0°4Ñ7ðA#ð  ™+¨¯©°CÑ(8Ñ8¸4Ñ?ðA#ð >ðA#ð ˜%‘K "§+¡+¨cÑ"2Ñ2°TÑ9ðA#ð 
öA#ôF)ð/.àð/.ð ð/.ð ð	/.ð
 ˜4‘<ð/.ð ˜‘:ð/.ð ˜‘*ð/.ð ð/.ð 
ô/.ðb< ð <¨#ô <ð˜uð ¨°6·<±<ÀÀtÐ3KÑ)Lô ð$ ð 14ðCNð CGØ"&òCNà�U‰{˜RŸ[™[¨Ñ-Ñ-ðCNð @ð	CNð
  ðCNð 
õCNó ðCNðJ ˜Cô  ð˜3ô ð- dô -ð.' Tô 'ðà	ôð" Cð "°5ð "¸Tô "ð* Cð ¨Dô ð #ñà�E‰kðð �t‘ðð 
�D‰õ	ð:?˜Cô ?ö1
ðf˜4ô ð ØØ!Ø $Ø#Ø15Ø Ø $òcà˜5‘[ 2§;¡;¨sÑ#3Ñ3ðcð ð	cð
 ðcð ðcð ˜‘+ðcð ˜‘ðcð ˜C˜5 $˜;Ñ'¨$Ñ.ðcð �T‰zðcð ˜‘+ðcð 
õcðJV°°SÐ:LÐ5LÑ0Mô Vôpô$ô"
,ð
 ¨¡ô 
ð*˜#ô *ð9¨5ð 9°Tô 9ð ð 59Ø)-Ø'+Ø $Ø!Ø/3Ø$(ñ<à�E‰k˜BŸK™K¨Ñ,Ñ,ð<ð ˜%‘K "§+¡+¨cÑ"2Ñ2ð<ð ð	<ð
 +¨TÑ1ð<ð 'ð<ð  ™ð<ð ˜‘+ð<ð �d‘
ð<ð  ™:¨Ñ,ð<ð ˜T‘zð<ð 
ô<ó ð<ð| ð
 Ø)-Ø'+Ø $Ø!Ø/3Ø$(ò+
à�E‰k˜BŸK™K¨Ñ,Ñ,ð+
ð ð	+
ð
 'ð+
ð  ™ð+
ð ˜‘+ð+
ð �d‘
ð+
ð  ™:¨Ñ,ð+
ð ˜T‘zð+
ð 
ô+
ó ð+
ðZ ð
 "&ØØ$ñIà�E‰k˜BŸK™K¨Ñ,Ñ,ðIð ðIð ˜$‘Jð	Ið
 ðIð ðIð 
ôIó ðIðV ð
 Ø48Ø)-Ø'+Ø!Ø/3Ø$(ò*
à�E‰k˜BŸK™K¨Ñ,Ñ,ð*
ð ð	*
ð
 +¨TÑ1ð*
ð 'ð*
ð  ™ð*
ð �d‘
ð*
ð  ™:¨Ñ,ð*
ð ˜T‘zð*
ð 
ô*
ó ð*
ðX €Fô'ð˜4ô ðà�}Ñ%¨Ñ,ðð  Ñ%ðð  Ñ$ð	ð
 
ôð0 T¨%°°e¸U°lÑ1CÐ*CÑ%Dô 0ðf DHñ
Ø%ð
Ø49¸D±Lð
à	õ
ñ:5
 e¨d¡lð 5
¸o÷ 5
ð 5
r”   c                   ó‚  • \ rS rSr% SrS\S'   S8S jrS\S	\S-  S
\S-  S\S-  S\S-  S\S-  S\S-  SS4S jr	S\SS4S jr
S\S-  4S jrS\4S jrS\4S jrS\S\SS4S jrS\SS4S jr S9S\\-  S\S-  S\S-  4S jjrS9S:S jjrS;S jrS<S jrS=S  jr S>SSS!\S-  SS"4S# jjrS9S!\S-  SS$4S% jjrS8S& jrSSSSSSSSS\SS'S'S4S\S-  S\S-  S(\S-  S)\S-  S*\S-  S+\S-  S,\S-  S!\S-  S-\S-  S\S-  S.\\   S-  S/\S0\SSS\4S1 jjr \!  S>S2\"\#   S3\$\\4   S4\S-  S5\S-  SS 4
S6 jj5       r%S7r&g)?r   i  z»Repo that stores refs, objects, and named files in memory.

MemoryRepos are always bare: they have no working tree and no index, since
those have a stronger dependency on the filesystem.
r‡  rˆ  r�   Nc                 óì   • SSK Jn  SSKJn  / U l        [        0 U R                  S9n[        R                  U [        5       U5        0 U l
        SU l        U" 5       U l        SU l        SU l        X l        g)z"Create a new repository in memory.r.   rS  )r˜  r“  TN)r¿   r4   r>  r˜  Ú_reflogrl   Ú_append_reflogr   r’   r[   Ú_named_filesrN  Ú_configÚ_descriptionrˆ  )r�   r4   r˜  Úrefs_containers       r‘   r’   ÚMemoryRepo.__init__  se   € å&Ý8à"$ˆŒÜ*¨2°d×6IÑ6IÑJˆÜ×Ñ˜$Ô 1Ó 3°^ÔDØ.0ˆÔØˆŒ	Ù!“|ˆŒØ*.ˆÔØ"ˆÔà2Õr”   r²  r³  r´  rµ  r¶  r·  r¸  c           	      óB   • U R                   R                  XX4XVU45        g r9  )r­  rò   )r�   r²  r³  r´  rµ  r¶  r·  r¸  s           r‘   r®  ÚMemoryRepo._append_reflog)  s"   € ð 	�‰×ÑØ˜7¨yÀGÐLõ	
r”   rT  c                 ó   • Xl         g)zZSet the description for this repository.

Args:
  description: Text to set as description
N©r±  rç  s     r‘   ræ  ÚMemoryRepo.set_description7  s
   € ð (Õr”   c                 ó   • U R                   $ )zTGet the description of this repository.

Returns:
  Repository description as bytes
r·  rF  s    r‘   rá  ÚMemoryRepo.get_description?  s   € ð × Ñ Ð r”   c                 ó(   • [         R                  S:g  $ ©rC  r÷   rJ  rF  s    r‘   rE  ÚMemoryRepo._determine_file_modeG  ó   € ô
 �|‰|˜wÑ&Ð&r”   c                 ó(   • [         R                  S:g  $ r¼  rJ  rF  s    r‘   rK  ÚMemoryRepo._determine_symlinksN  r¾  r”   rõ   ro  c                 ó    • X R                   U'   g)rq  N)r¯  rr  s      r‘   r`  ÚMemoryRepo._put_named_fileU  s   € ð #+×Ñ˜$Òr”   c                 ó@   •  U R                   U	 g ! [         a     g f = fr9  )r¯  r¶   rm  s     r‘   ru  ÚMemoryRepo._del_named_file^  s'   € ð	Ø×!Ñ! $Ñ'øÜó 	Ùð	ús   ‚ �
œr™  c                 ó¦   • [        U[        5      (       a  UR                  5       OUnU R                  R	                  US5      nUc  g[        U5      $ )aœ  Get a file from the control dir with a specific name.

Although the filename should be interpreted as a filename relative to
the control dir in a disk-baked Repo, the object returned need not be
pointing to a file in that location.

Args:
  path: The path to the file, relative to the control dir.
  basedir: Optional base directory for the path
Returns: An open file object, or None if the file does not exist.
N)r  r  r×   r¯  r®   r%   )r�   rõ   r™  Úpath_strro  s        r‘   rl  ÚMemoryRepo.get_named_filed  sI   € ô  %/¨t´U×$;Ñ$;�4—;‘;”=ÀˆØ×$Ñ$×(Ñ(¨°4Ó8ˆØÑØÜ�xÓ Ð r”   r¿   rw  c                 ó   • [         e)z¼Fail to open index for this repo, since it is bare.

Args:
  config: Unused; kept for signature compatibility with ``BaseRepo``.

Raises:
  NoIndexPresent: Raised when no index is present
)rF   ri  s     r‘   ry  ÚMemoryRepo.open_indexz  s
   € ô Ðr”   c                 ó   • Xl         g)z3Initialize repository configuration for MemoryRepo.N©r°  ri  s     r‘   rc  ÚMemoryRepo._init_config…  s   € à�r”   c                 ó   • U R                   $ )z;Retrieve the config object.

Returns: `ConfigFile` object.
rË  rF  s    r‘   r$  ÚMemoryRepo.get_config‰  s   € ð
 �|‰|Ðr”   c                 ó   • SSK Jn  U" U 5      $ )zjGet the appropriate rebase state manager for this repository.

Returns: MemoryRebaseStateManager instance
r.   )ÚMemoryRebaseStateManager)rN  rÐ  )r�   rÐ  s     r‘   rê  Ú#MemoryRepo.get_rebase_state_manager�  s   € õ
 	5á'¨Ó-Ð-r”   rì  r7   c                 óü   • SSK JnJnJn  Uc  U R	                  5       nU R                  U5      nU R                  c  U" X5      nU" U5      U l        OU R                  R                  U5        U" XX R                  S9$ )zÝReturn a BlobNormalizer object for checkin/checkout operations.

Args:
  config: Configuration to consult for filter setup. If None,
    falls back to ``self.get_config_stack()``.
  tree: Tree to read .gitattributes from
r.   r�  r‘  r’  r•  s           r‘   rî  ÚMemoryRepo.get_blob_normalizer™  s}   € ÷ 	QÑPà‰>Ø×*Ñ*Ó,ˆFØ×/Ñ/°Ó5ˆà×ÑÑ&Ù,¨VÓ:ˆOÙ"/°Ó"@ˆDÕà×Ñ×.Ñ.¨vÔ6á#Ø¨×>QÑ>Qñ
ð 	
r”   r0   c                 ó   • SSK Jn  U" / 5      $ )z&Read gitattributes for the repository.r.   )r0   )rm  r0   )r�   rì  r0   s      r‘   rñ  ÚMemoryRepo.get_gitattributes³  s   € å(ñ ˜RÓ Ð r”   c                 ó”   • U R                   b!  U R                   R                  5         SU l         U R                  R                  5         g)z.Close any resources opened by this repository.N)rˆ  r  r=  rF  s    r‘   r  ÚMemoryRepo.close»  s<   € ð ×ÑÑ*Ø×Ñ×%Ñ%Ô'Ø"&ˆDÔà×Ñ×ÑÕ!r”   FÚauthorÚcommit_timestampÚcommit_timezoneÚauthor_timestampÚauthor_timezoneÚencodingÚmerge_headsÚ	no_verifyÚsignc           
      óN  • SSK nSSKJn  Uc  [        S5      eU" 5       n[	        U5      U R
                  R                  :w  a#  [        SU R
                  R                   S35      eUUl        Uc  U R                  5       nUc  / nUc
  [        USS	9n[        U5        UUl        Uc  UR                   " 5       n[        U5      Ul        Uc  SnUUl        Uc
  [        US
S	9nUUl        [        U5        Uc  Un[        U5      Ul        Uc  UnUUl        U	c   UR%                  SS5      n	U	b  U	Ul        [+        U5      (       a  U" U U5      nUc  [        S5      eUc  [        S5      eUUl        U
c.  UUl        U R0                  R3                  U5        UR8                  $  U R4                  U
   nU/UQUl        U R0                  R3                  U5        U R4                  R7                  U
UUR8                  SU-   U[        U5      US9nU(       d  SSKJn  U" U
< S35      eUR8                  $ ! [&         a     GNf = f! [&         aY    UUl        U R0                  R3                  U5        U R4                  R;                  U
UR8                  SU-   U[        U5      US9n N˜f = f)aÓ  Create a new commit.

This is a simplified implementation for in-memory repositories that
doesn't support worktree operations or hooks.

Args:
  message: Commit message
  committer: Committer fullname
  author: Author fullname
  commit_timestamp: Commit timestamp (defaults to now)
  commit_timezone: Commit timestamp timezone (defaults to GMT)
  author_timestamp: Author timestamp (defaults to commit timestamp)
  author_timezone: Author timestamp timezone (defaults to commit timezone)
  tree: SHA1 of the tree root to use
  encoding: Encoding
  ref: Optional ref to commit to (defaults to current branch).
    If None, creates a dangling commit without updating any ref.
  merge_heads: Merge heads
  no_verify: Skip pre-commit and commit-msg hooks (ignored for MemoryRepo)
  sign: GPG Sign the commit (ignored for MemoryRepo)
  config: Configuration to consult for committer/author identity. If
    None, falls back to ``self.get_config_stack()``.

Returns:
  New commit SHA1
r   Nr.   )rb   z%tree must be specified for MemoryRepoztree must be a z-character hex sha stringÚ	COMMITTER)rÀ   ÚAUTHOR)Úi18nÚcommitEncodingzMessage callback returned NonezNo commit message specifieds   commit: )r¸  rµ  r¶  r·  )ÚCommitErrorz changed during commit) rÁ  r}   rb   rÖ   rç   r>  rÍ  rì  rû  r   r   rµ  r  Úcommit_timerÚ  rØ  Úauthor_timerÜ  r®   r¶   rÝ  Úcallabler¸  rí   r=  Ú
add_objectr€   Úset_if_equalsr§  Ú
add_if_newr  ræ  )r�   r¸  rµ  rØ  rÙ  rÚ  rÛ  rÜ  rì  rÝ  r²  rÞ  rß  rà  r¿   rÁ  rb   ÚcÚold_headÚokræ  s                        r‘   Ú	do_commitÚMemoryRepo.do_commitÄ  sÑ  € óV 	å#à‰<ÜÐDÓEÐEá‹HˆÜˆt‹9˜×*Ñ*×5Ñ5Ó5ÜØ! $×"4Ñ"4×"?Ñ"?Ð!@Ð@YÐZóð ð ˆŒà‰>Ø×*Ñ*Ó,ˆFØÑØˆKØÑÜ)¨&°{ÑCˆIÜ˜IÔ&ØˆŒØÑ#Ø#Ÿyšy›{ÐÜÐ,Ó-ˆŒØÑ"ØˆOØ+ˆÔØ‰>Ü& v°HÑ=ˆFØˆŒÜ˜FÔ#ØÑ#Ø/ÐÜÐ,Ó-ˆŒØÑ"Ø-ˆOØ+ˆÔØÑðØ!Ÿ:™: iÐ1AÓB�ð ÑØ!ˆAŒJô �G×ÑÙ˜d AÓ&ˆGØ‰Ü Ð!AÓBÐBà‰?ÜÐ:Ó;Ð;àˆŒ	à‰;à#ˆAŒIØ×Ñ×(Ñ(¨Ô+ð> �t‰tˆð;ØŸ9™9 S™>�Ø%Ð4¨Ð4�”	Ø×!Ñ!×,Ñ,¨QÔ/Ø—Y‘Y×,Ñ,ØØØ—D‘DØ'¨'Ñ1Ø'Ü!Ð"2Ó3Ø,ð -ð �ö( Ý/á! S¡GÐ+AÐ"BÓCÐCà�t‰tˆøôe ó ÚðûôD ó 
Ø'�”	Ø×!Ñ!×,Ñ,¨QÔ/Ø—Y‘Y×)Ñ)ØØ—D‘DØ'¨'Ñ1Ø'Ü!Ð"2Ó3Ø,ð *ð ’ð
ús&   ÄH0 Æ"A)I È0
H>È=H>ÉA J$Ê#J$r}   r€   rP  r>  c                 óä   • U " 5       nU H  nUR                   R                  U5        M      UR                  5        H   u  pxUR                  R	                  Xx5        M"     UR                  SX4S9  U$ )a+  Create a new bare repository in memory.

Args:
  objects: Objects for the new repository,
    as iterable
  refs: Refs as dictionary, mapping names
    to object SHA1s
  format: Repository format version (defaults to 0)
  object_format: Object format to use ("sha1" or "sha256", defaults to "sha1")
T)rN  rP  r>  )r=  rê  rñ   r€   rì  rf  )	rÊ  r}   r€   rP  r>  rÑ  r6  Úrefnamerî   s	            r‘   r  ÚMemoryRepo.init_bareL  sb   € ñ$ ‹eˆÛˆCØ×Ñ×'Ñ'¨Ö,ñ à ŸJ™JžL‰LˆGØ�H‰H×Ñ Ö-ñ )à�‰˜T¨&ˆÑNØˆ
r”   )r°  r±  r¯  r­  rN  rˆ  r>  r¥  r9  rE  rD  rG  rH  rI  )'r–   r—   r˜   r™   rš   r¦  r’   r  r  r®  ræ  rá  r  rE  rK  r›   r`  ru  r%   rl  ry  rc  r$  rê  rî  rñ  r  rk   Úfloatrc   rn   r;  rð  r©  r!   re   r#   r  rœ   r�   r”   r‘   r   r     sÚ  ‡ ñð +Ó*ô3ð 
àð
ð ˜‘ð
ð ˜‘ð	
ð
 ˜4‘<ð
ð ˜‘:ð
ð ˜‘*ð
ð ˜‘ð
ð 
ô
ð(¨5ð (°Tô (ð! ¨¡ô !ð' dô 'ð' Tô 'ð+ Cð +°5ð +¸Tô +ð Cð ¨Dô ð #ñ!à�E‰kð!ð �t‘ð!ð 
�4‰õ	!ö,	ôôô.ð DHñ
Ø%ð
Ø49¸D±Lð
à	õ
ñ4! e¨d¡lð !¸oõ !ô"ð !%Ø"&Ø#Ø)-Ø&*Ø)-Ø&*Ø $Ø!%Ø!Ø-1ØØØ"&ñFà˜‘ðFð ˜4‘<ðFð ˜‘ð	Fð
   $™,ðFð ˜t™ðFð   $™,ðFð ˜t™ðFð ˜‰oðFð ˜$‘,ðFð �4‰ZðFð ˜(‘^ dÑ*ðFð ðFð ðFð  ðFð  
õ!FðP ð
 "Ø$(ñà˜'Ñ"ðð �c˜8�mÑ$ðð �d‘
ð	ð
 ˜T‘zðð 
ôó ór”   r   r9  )r'  r   r�   N)£rš   Ú__all__rq  Úloggingr¬   ru  rü   rÁ  r0  Úcollections.abcr   r    r!   r"   r#   r$   Úior%   Útypesr&   Útypingr'   r(   r)   r*   Úversion_infor-   Útyping_extensionsrm  r/   r0   r1   r¿   r2   r3   r4   r5   Ú	diff_treer6   r“  r7   r8   rƒ   r9   r
  r;   r>  r<   r=  r=   r>   Úpackr?   rN  r@   r  rA   r‹  rC   r  rD   rE   r  rF   rG   rH   rI   rJ   rK   rL   ÚfilerM   rN   rO   rP   rQ   rR   rˆ   rS   rT   rU   rV   rW   rX   rY   rZ   r[   r\   r]   r^   r_   r`   r}   ra   rb   rc   rd   re   rf   rg   rh   ri   rj   r€   rk   rl   rm   rn   ro   rp   rq   rr   rs   rt   ru   rv   Ú	getLoggerr–   rª  Ú__getattr__r   r	   r   r~   r
   r   r   r   r   r   r   r   r   rÏ  r   r   r›   rL  r¾   r  r   r   Úrangerß   rá   r   r:  r;  r   r   r  r  r   r)  r   r   r   r   r   r   r_  r   r   r�   r”   r‘   Ú<module>r     sP  ðñ0ò€ó> Û Û 	Û Û 
Û Û ß V× VÝ Ý ÷ó ð ×Ñ�wÓÞå&æ÷ >Ñ=ßKÓKÝ)ß<ÝÝÝ+ß:Ý$Ý*ÝÝ"ç )÷÷ ñ ÷÷ ÷÷ ñ ÷÷ ñ ÷
÷ 
õ 
õ ,÷÷ ÷ ó ð 
×	Ò	˜8Ó	$€ñ "Øà;Ø'Ø;Ø;Ø(SØ=ñó
€ð €
Ø€	ØÐ áˆC�yÑ!€Ø
€Ø€Ø€Ø€Ø€	Ø	€Ø€	ð €LØ€IØˆlÐØˆmÐØ€IØ€HðÐ ð €ô!˜)ô !ô4˜iô 4ñ
&˜w s¨C xÑ0°4Ñ7ð &À5ÈÈcÈÁ?õ &ñR0'˜hð 0'¨c°D©jð 0'ÀEõ 0'ðfG %ð G¨Dô Gñ$ ‘u˜R“yÓ! MÑ1€ð	B ð 	B¨%ô 	BðS ð S¨uð S¸ô Sð.Ø˜%‘ðà	ˆ(�D˜‘NÐ
"Ñ#ôðB# w¨x¸À(Ñ9KÐ/KÑ'Lð #ÐQVô #ð* ð ¨ô ð.* 3¨¡;°Ñ#5ð *Ð:Mô *ôZ÷23ñ 3÷ld
ñ d
ðNB�Hð B ô Bô	˜ô 	ô	#˜9ô 	#ô5 9ô 5÷Rñ Rôjn
ˆ8ô n
ôb'T�õ Tr”   