ó
    ‘óýjð> ã                   óä	  • % 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  SSKJrJr  SSKJrJrJrJr  \(       a  SSKJr  O SSKJr  \R4                  S:¼  a  SS	KJr  OSS	KJr  SS
KJrJr  SSKJ r J!r!J"r"J#r#J$r$J%r%J&r&  SSK'J(r(  SSK)J*r*J+r+J,r,  \(       a  SSK-J.r.  SSK'J/r/  Sr0Sr1Sr2Sr3Sr4Sr5Sr6Sr7Sr8Sr9Sr:Sr;Sr<\Rz                  " S5      r>Sr?S r@S!rAS"rB\@S#4rC/ \CQ\BP\AP7rDS$rES%rF\" S&\G5      rH\" S'\G5      rI\H" S(5      rJ\H\KS)'    " S* S+\!5      rLS,\MS-\N4S. jrOS/rP\P4S0\GS1\MS-\G4S2 jjrQS3\IS-\H4S4 jrRS5\H\S-  S-\I4S6 jrTS5\G\S-  S-\N4S7 jrU\" S8\S\G5      rVS9\VS5\H\S-  S-\V4S: jrWS;\S\G-  S-\S4S< jrXS=\MS>\MS-\G4S? jrYS˜S@\SSA\SS-  S-\Z4SB jjr[SC\G\M-  S-\\SD   S-  4SE jr]S5\S\G-  SF\SS-S4SG jr^SH\GS-  SF\SS-S4SI jr_S9\S\G-  S-\G4SJ jr`SK\MS-S4SL jraSM\GS-\G4SN jrb " SO SP5      rc\(       a1  SQSDS-\SR   4SS jrdSQSDS-\ST   4SU jreSQSDS-\SV   4SW jrfSQSDS-\SX   4SY jrgO$SQSDS-\N4SZ jrdSQSDS-\N4S[ jreSQSDS-\N4S\ jrfSQSDS-\N4S] jrg " S^ SD5      rh " S_ SV\h5      riS`\\G   S-\\jSa   \j\GS-  \G4   -     4Sb jrkSc\\j\G\G4      Sd\GS-  S-\\G   4Se jrlSd\GS-\MS-  4Sf jrm " Sg SX\h5      rn " Sh Si\5      ro S˜SjSk.Sl\GSm\MS-  Sn\NS-\\j\G\M\G4      4So jjjrpSM\\j\G\M\H4      S-\\G   4Sp jrqSq\r\G\j\M\H4   4   Sr\NS-\\o   4Ss jrsSt\j\G\j\M\H4   4   S-\G4Su jrtSt\j\G\j\M\H4   4   S-\G4Sv jru S™S@\GSw\MSx\HSy\SS-\S4
Sz jjrv " S{ S|\w5      rx " S} ST\h5      rySl\GS-\j\M\N4   4S~ jrzSl\GS-\j\M\N4   4S jr{SšS€\MS�\NS-\G4S‚ jjr|Sƒ\GS-\j\G\MS-  \j\MS-  \N4   4   4S„ jr}Sƒ\GS-\j\G\MS-  \j\MS-  \N4   4   4S… jr~S†\GS‡\MSˆ\j\M\N4   S-\G4S‰ jr\j\GS-  \€\G   \j\GS-  \MS-  \j\MS-  \NS-  4   4   \j\GS-  \MS-  \j\MS-  \NS-  4   4   \GS-  \€\n   \GS-  \GS-  \€\j\G\G4      4	   r�\}\64S`\\G   SŠ\
\G/\j\G\MS-  \j\MS-  \N4   4   4   S‹\GS-\�4SŒ jjr‚S�\,S-\G4SŽ jrƒS�\GS-\G4S� jr„\64S`\\G   S‹\GS-\�4S‘ jjr… " S’ SR\h5      r†\†\y\i\n4r‡0 rˆ\r\G\M-  \\\h   4   \KS“'   \‡ H#  r‰\‰\ˆ\‰GR                  '   \‰\ˆ\‰GR                  '   M%     S”\GS-\†4S• jrŒ\pr�\srŽ SS–K�Jpr�  SS—K�Jsr‘  \�rp\‘rsg! \ a
    SSKJr   GN‰f = f! \ a     gf = f)›zAccess to base git objects.)3ÚBEGIN_PGP_SIGNATUREÚBEGIN_SSH_SIGNATUREÚBEGIN_X509_SIGNATUREÚDEFAULT_LOOSE_OBJECT_SIZE_LIMITÚMAX_TIMEÚOBJECT_CLASSESÚSIGNATURE_PGPÚSIGNATURE_SSHÚS_IFGITLINKÚS_ISGITLINKÚZERO_SHAÚBlobÚCommitÚEmptyFileExceptionÚFixedShaÚObjectIDÚRawObjectIDÚShaFileÚSubmoduleEncounteredÚTagÚTreeÚ	TreeEntryÚcheck_hexshaÚcheck_identityÚ
check_timeÚfilename_to_hexÚformat_time_entryÚformat_timezoneÚgit_lineÚhex_to_filenameÚ
hex_to_shaÚis_blobÚ	is_commitÚis_tagÚis_treeÚ	key_entryÚkey_entry_name_orderÚobject_classÚobject_headerÚparse_commit_brokenÚparse_time_entryÚparse_time_entry_brokenÚparse_timezoneÚparse_timezone_brokenÚ
parse_treeÚpretty_format_tree_entryÚserializable_propertyÚserialize_treeÚ
sha_to_hexÚsorted_tree_itemsÚvalid_hexshaé    N)ÚCallableÚIterableÚIteratorÚSequence)ÚBufferedIOBaseÚBytesIO)ÚIOÚTYPE_CHECKINGÚ
NamedTupleÚTypeVar)Úsha1)é   é   )ÚSelf)ÚNewTypeÚ	TypeGuardé   )ÚChecksumMismatchÚFileFormatExceptionÚNotBlobErrorÚNotCommitErrorÚNotTagErrorÚNotTreeErrorÚObjectFormatException)ÚGitFile)ÚDEFAULT_OBJECT_FORMATÚSHA256ÚObjectFormat)ÚHASH)Ú_GitFileó   trees   parents   authors	   committers   encodings   mergetagó   gpgsigs   gpgsig-sha256s   objects   typeó   tags   taggeri à  sA   ^(?P<person>.*) (?P<time>-?[0-9]+) (?P<timezone>[+-]{0,2}[0-9]+)$l   ÿÿÿÿ s   -----BEGIN PGP SIGNATURE-----s   -----BEGIN SSH SIGNATURE-----s   -----BEGIN SIGNED MESSAGE-----s   -----BEGIN PGP MESSAGE-----s   pgps   sshr   r   s(   0000000000000000000000000000000000000000r   c                   ó   • \ rS rSrSrSrg)r   é·   z+An unexpectedly empty file was encountered.© N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú__static_attributes__rY   ó    Ú:/usr/local/lib/python3.13/site-packages/dulwich/objects.pyr   r   ·   s   † Ü5r`   r   ÚmÚreturnc                 ó<   • [         R                  " U 5      [        :H  $ )zXCheck if a mode indicates a submodule.

Args:
  m: Mode to check
Returns: a ``boolean``
)ÚstatÚS_IFMTr
   )rb   s    ra   r   r   »   s   € ô �;Š;�q‹>œ[Ñ(Ð(r`   i    ÚstringÚmax_sizec                 ó  • [         R                  " 5       nUR                  XS-   5      nUR                  (       a  [         R                  " S5      eX2R                  5       -  n[        U5      U:”  a  [         R                  " S5      eU$ )z¶Decompress a zlib-compressed loose object, bounded by max_size.

Raises:
  zlib.error: if the decompressed data would exceed max_size bytes,
    or on any other decompression error.
rF   z&decompressed data exceeds maximum size)ÚzlibÚdecompressobjÚ
decompressÚunconsumed_tailÚerrorÚflushÚlen)rg   rh   ÚdcompÚdcompeds       ra   Ú_decompressrs   É   sn   € ô ×ÒÓ €Eà×Ñ˜v°!¡|Ó4€GØ××Ü�jŠjÐAÓBÐBØ�{‰{‹}Ñ€GÜ
ˆ7ƒ|�hÓÜ�jŠjÐAÓBÐBØ€Nr`   Úshac                 ó€   • [         R                  " U 5      n[        U5      S;  a  [        SU< 35      e[	        U5      $ )z5Takes a string and returns the hex of the sha within.©é(   é@   z Incorrect length of sha string: )ÚbinasciiÚhexlifyrp   Ú
ValueErrorr   )rt   Úhexshas     ra   r2   r2   Ý   s<   € ä×Ò˜cÓ"€Fä
ˆ6ƒ{˜(Ó"ÜÐ;¸F¹:ÐFÓGÐGÜ�FÓÐr`   Úhexc                 ó   • [        U 5      S;  a  [        SU < 35      e [        [        R                  " U 5      5      $ ! [
         a4  n[        U [        5      (       d  e [        UR                  S   5      UeSnAff = f)z)Takes a hex sha and returns a binary sha.rv   zIncorrect length of hexsha: r5   N)	rp   r{   r   ry   Ú	unhexlifyÚ	TypeErrorÚ
isinstanceÚbytesÚargs)r}   Úexcs     ra   r    r    æ   ss   € ô ˆ3ƒx�xÓÜÐ7¸±wÐ?Ó@Ð@ð/Üœ8×-Ò-¨cÓ2Ó3Ð3øÜó /Ü˜#œu×%Ñ%ØÜ˜Ÿ™ !™Ó%¨3Ð.ûð/ús    ? ¿
A=Á	/A8Á8A=c                 ó’   • [        U 5      S;  a  g [        R                  " U 5        g! [        [        R                  4 a     gf = f)zªCheck if a hex string is a valid SHA1 or SHA256.

Args:
    hex: Hex string to validate

Returns:
    True if valid SHA1 (40 chars) or SHA256 (64 chars), False otherwise
rv   FT)rp   ry   r   r€   ÚError)r}   s    ra   r4   r4   ó   sH   € ô ˆ3ƒx�xÓØðÜ×Ò˜3Ôð øô ”x—~‘~Ð&ó Ùðús   ’) ©AÁAÚPathTÚpathc                 óÜ  • [        U [        5      (       al  [        U[        5      (       a  UR                  S5      nOUnUSS nUSS n[        R
                  R                  XU5      n[        U[        5      (       d   eU$ [        U[        5      (       a  UR                  S5      nOUnUSS nUSS n[        R
                  R                  XU5      n	[        U	[        5      (       d   eU	$ )zDTakes a hex sha and returns its filename relative to the given path.ÚasciiNé   )r�   Ústrr‚   ÚdecodeÚosrˆ   ÚjoinÚencode)
rˆ   r}   Úhex_strÚdir_nameÚ	file_nameÚresultÚ	hex_bytesÚ
dir_name_bÚfile_name_bÚresult_bs
             ra   r   r   	  s×   € ô
 �$œ×ÑÜ�cœ5×!Ñ!Ø—j‘j Ó)‰GàˆGØ˜2˜A�;ˆØ˜A˜B�Kˆ	Ü—‘—‘˜d¨iÓ8ˆÜ˜&¤#×&Ñ&Ð&Ð&Øˆô �cœ3×ÑØŸ
™
 7Ó+‰IàˆIØ˜r �]ˆ
Ø  �mˆÜ—7‘7—<‘< °+Ó>ˆÜ˜(¤E×*Ñ*Ð*Ð*Øˆr`   Úfilenamec                 óJ  • SSK nUR                  S[        5        SU < 3n[        U [        5      (       a‚  U R                  [        R                  R                  S5      SS n[        U5      S:X  d   U5       eUu  pE[        U5      S:X  a  [        U5      S:X  d   U5       eXE-   nUR                  S5      nOÈ[        [        R                  R                  [        5      (       a)  [        R                  R                  R                  S5      O[        R                  R                  nU R                  US5      SS n	[        U	5      S:X  d   U5       eU	u  p«[        U
5      S:X  a  [        U5      S:X  d   U5       eX«-   n[        [        U5      5        UR                  S5      $ )	z?Takes an object filename and returns its corresponding hex sha.r5   NzLfilename_to_hex is unused and will be removed in a future version of DulwichzInvalid object filename: r‹   éþÿÿÿé&   rŠ   )ÚwarningsÚwarnÚDeprecationWarningr�   rŒ   ÚrsplitrŽ   rˆ   Úseprp   r�   r    r   r�   )r™   r�   ÚerrmsgÚnamesÚbaseÚrestr‘   r•   r¡   Únames_bÚbase_bÚrest_bs               ra   r   r   %  s[  € ãà‡M�MØVÜôð
 )¨©Ð5€FÜ�(œC× Ñ Ø—‘¤§¡§¡¨QÓ/°°Ð4ˆÜ�5‹z˜Q‹Ð& Ó&ˆØ‰
ˆÜ�4‹y˜A‹~¤# d£)¨r£/Ð9°6Ó9Ð1Ø‘+ˆØ—N‘N 7Ó+‰	ô ,6´b·g±g·k±kÄ3×+GÑ+GŒB�G‰G�K‰K×Ñ˜wÔ'ÌRÏWÉWÏ[É[ð 	ð —/‘/ # qÓ)¨"¨#Ð.ˆÜ�7‹|˜qÓ Ð( &Ó(Ð Ø ‰ˆÜ�6‹{˜aÓ¤C¨£K°2Ó$5Ð=°vÓ=Ð5Ø‘Oˆ	ÜŒx˜	Ó"Ô#Ø×Ñ˜GÓ$Ð$r`   Únum_typeÚlengthc                 ó”   • [        U 5      nUc  [        SU  35      eUR                  S-   [        U5      R	                  S5      -   S-   $ )zCReturn an object header for the given numeric type and text length.úunsupported class type num: ó    rŠ   ó    )r'   ÚAssertionErrorÚ	type_namerŒ   r�   )r©   rª   Úclss      ra   r(   r(   D  sL   € ä
�xÓ
 €CØ
�{ÜÐ;¸H¸:ÐFÓGÐGØ�=‰=˜4Ñ¤# f£+×"4Ñ"4°WÓ"=Ñ=ÀÑEÐEr`   ÚnameÚ	docstringc                 ó\   ^ • SSS[         SS4U 4S jjnSSS[         4U 4S jjn[        X2US9$ )	zBA property that helps tracking whether serialization is necessary.Úobjr   Úvaluerc   Nc                 ó4   >• [        U ST-   U5        SU l        g)z€Set the property value and mark the object as needing serialization.

Args:
  obj: The ShaFile object
  value: The value to set
Ú_TN)ÚsetattrÚ_needs_serialization)rµ   r¶   r²   s     €ra   ÚsetÚ"serializable_property.<locals>.setO  s   ø€ ô 	��S˜4‘Z Ô'Ø#'ˆÕ r`   c                 ó"   >• [        U ST-   5      $ )zXGet the property value.

Args:
  obj: The ShaFile object

Returns:
  The property value
r¸   )Úgetattr)rµ   r²   s    €ra   ÚgetÚ"serializable_property.<locals>.getY  s   ø€ ô �s˜C $™JÓ'Ð'r`   )Údoc)ÚobjectÚproperty)r²   r³   r»   r¿   s   `   ra   r0   r0   L  s?   ø€ ð(�ð (¤6ð (¨d÷ (ð	(�ð 	(œv÷ 	(ô �C )Ñ,Ð,r`   Útyper   c                 ó.   • [         R                  U S5      $ )zæGet the object class corresponding to the given type.

Args:
  type: Either a type name string or a numeric type.
Returns: The ShaFile subclass corresponding to the given type, or None if
    type is not a valid type name/number.
N)Ú	_TYPE_MAPr¿   )rÄ   s    ra   r'   r'   g  s   € ô �=‰=˜˜tÓ$Ð$r`   Ú	error_msgc                 óF   • [        U 5      (       d  [        U SU < 35      eg)zÃCheck if a string is a valid hex sha string.

Args:
  hex: Hex string to check
  error_msg: Error message to use in exception
Raises:
  ObjectFormatException: Raised when the string is not valid
Ú N)r4   rM   )r}   rÇ   s     ra   r   r   r  s*   € ô ˜×ÑÜ# y k°°3±'Ð$:Ó;Ð;ð r`   Úidentityc           	      ó  • U c  [        U5      eU R                  S5      nU R                  S5      n[        US:¬  XS-
     S:H  U R                  SUS-   5      S:H  U[        U 5      S-
  :H  SU ;  SU ;  /5      (       d  [        U5      eg)	z¸Check if the specified identity is valid.

This will raise an exception if the identity is not valid.

Args:
  identity: Identity string
  error_msg: Error message to use in exception
Nó   <ó   >rF   é    éÿÿÿÿr®   ó   
)rM   ÚfindÚallrp   )rÊ   rÇ   Úemail_startÚ	email_ends       ra   r   r     s¤   € ð ÑÜ# IÓ.Ð.Ø—-‘- Ó%€KØ—‘˜dÓ#€IÜà˜1ÑØ 1‘_Ñ%¨Ñ0Ø�M‰M˜$ ¨a¡Ó0°BÑ6Øœ˜X›¨Ñ*Ñ*Ø˜Ñ!Ø˜Ñ!ð	
÷	ñ 	ô $ IÓ.Ð.ð	r`   c                 óT   • [        U [        5      (       a  U R                  SS5      $ U $ )z2Convert a path to bytes for use in error messages.úutf-8Úsurrogateescape)r�   rŒ   r�   )rˆ   s    ra   Ú_path_to_bytesrØ   ™  s&   € ä�$œ×ÑØ�{‰{˜7Ð$5Ó6Ð6Ø€Kr`   Útime_secondsc                 ó<   • U [         :”  a  [        S[          35      eg)zœCheck if the specified time is not prone to overflow error.

This will raise an exception if the time is not valid.

Args:
  time_seconds: time in seconds

zDate field should not exceed N)r   rM   )rÙ   s    ra   r   r      s$   € ð ”hÓÜ#Ð&CÄHÀ:Ð$NÓOÐOð r`   Úitemsc                  ó*   • SR                  U 5      S-   $ )z*Formats items into a space separated line.r­   rÐ   )r�   )rÛ   s    ra   r   r   ®  s   € à�9‰9�UÓ˜eÑ#Ð#r`   c                   óP   • \ rS rSrSrSrS\\-  SS4S jrS\4S jr	S\4S	 jr
Srg)
r   i³  zBSHA object that behaves like hashlib's but is given a fixed value.)Ú_hexshaÚ_shar|   rc   Nc                 óÖ   • [        U[        5      (       a  UR                  S5      n[        U[        5      (       d  [	        SU< 35      eXl        [        [        U5      5      U l        g)z`Initialize FixedSha with a fixed SHA value.

Args:
    hexsha: Hex SHA value as string or bytes
rŠ   zExpected bytes for hexsha, got N)	r�   rŒ   r�   r‚   r€   rÞ   r    r   rß   )Úselfr|   s     ra   Ú__init__ÚFixedSha.__init__¸  sU   € ô �fœc×"Ñ"Ø—]‘] 7Ó+ˆFÜ˜&¤%×(Ñ(ÜÐ=¸f¹ZÐHÓIÐIØŒÜœx¨Ó/Ó0ˆ�	r`   c                 ó   • U R                   $ )zReturn the raw SHA digest.)rß   ©rá   s    ra   ÚdigestÚFixedSha.digestÅ  s   € à�y‰yÐr`   c                 ó8   • U R                   R                  S5      $ )zReturn the hex SHA digest.rŠ   )rÞ   r�   rå   s    ra   Ú	hexdigestÚFixedSha.hexdigestÉ  s   € à�|‰|×"Ñ" 7Ó+Ð+r`   )rZ   r[   r\   r]   r^   Ú	__slots__rŒ   r‚   râ   ræ   ré   r_   rY   r`   ra   r   r   ³  s9   † ÙLà#€Ið1˜s U™{ð 1¨tô 1ð˜ô ð,˜3÷ ,r`   r   rµ   r   c                 ó    • U R                   S:H  $ ©zCheck if a ShaFile is a Commit.ó   commit©r°   ©rµ   s    ra   r"   r"   Ñ  ó   € à�}‰} 	Ñ)Ð)r`   r   c                 ó    • U R                   S:H  $ ©zCheck if a ShaFile is a Tree.rT   rï   rð   s    ra   r$   r$   Õ  ó   € à�}‰} Ñ'Ð'r`   r   c                 ó    • U R                   S:H  $ ©zCheck if a ShaFile is a Blob.ó   blobrï   rð   s    ra   r!   r!   Ù  rô   r`   r   c                 ó    • U R                   S:H  $ ©zCheck if a ShaFile is a Tag.rV   rï   rð   s    ra   r#   r#   Ý  ó   € à�}‰} Ñ&Ð&r`   c                 ó    • U R                   S:H  $ rí   rï   rð   s    ra   r"   r"   â  rñ   r`   c                 ó    • U R                   S:H  $ ró   rï   rð   s    ra   r$   r$   æ  rô   r`   c                 ó    • U R                   S:H  $ rö   rï   rð   s    ra   r!   r!   ê  rô   r`   c                 ó    • U R                   S:H  $ rù   rï   rð   s    ra   r#   r#   î  rú   r`   c                   óä  • \ rS rSr% SrSr\\S'   \\S'   \	\S'   \
\   S-  \S'   S	\S
'   \\S'   SES jr\S\SS 4S j5       r\4S\S\	SS4S jjrSFS\	S\\   4S jjrSFS\	S\4S jjrS\
\   4S jrS\4S jrS\4S jrS\	4S jrS\4S jr SGSS.S\S\\-  S-  S\\-  S-  SS4S jjjr SGSSS .S!\
\   S\\-  S-  S\S-  S\\-  S-  SS4
S" jjjr\S\S#\\\   -  S$-  SS 4S% j5       r \4S\S\	SS4S& jjr!\"S\S\4S' j5       r#\"S\S(.S#\\\   -  S$-  S\S-  S\	SS 4S) jj5       r$S!\
\   SS4S* jr%S\
\   4S+ jr&\" SGS\S(.S,\\-  S\S-  S\S-  S\	SS 4
S- jjj5       r'\" SGS\S(.S#\\\   -  S$-  S\S-  S\S-  S\	SS 4
S. jjj5       r(\ SGSSS .S\	S/\S\\-  S-  S\S-  S\\-  S-  SS 4S0 jjj5       r)\ SGSS1.S\	S!\
\   S\\-  S-  S\S-  SS 4
S2 jjj5       r*\"S/\S\+4S3 j5       r,S4\S5\SS4S6 jr-SES7 jr.S\4S8 jr/S\	4S9 jr0SGS\S-  SS:4S; jjr1SHS< jr2\3S\4S= j5       r4SGS\S-  S\4S> jjr5S\4S? jr6S@\7S\4SA jr8S@\7S\4SB jr9S@\7S\4SC jr:S@\7S\4SD jr;Sr<g)Ir   ió  zA git SHA file.)Ú_chunked_textrº   rß   Úobject_formatrº   r°   Útype_numNr   zFixedSha | HASH | Nonerß   r  rc   c                 óD   • SU l         SU l        SU l        [        U l        g)zInitialize a ShaFile.NT)rß   r   rº   rO   r  rå   s    ra   râ   ÚShaFile.__init__ÿ  s!   € àˆŒ	Ø!ˆÔØ$(ˆÔ!Ü2ˆÕr`   Úmagicc                 óÌ  • Sn[         R                  " 5       nUR                  X5      nSnUR                  SU5      n[	        U5      nUS:  a�  [	        U5      U:¼  a  [         R
                  " S5      eUR                  (       d  [        S5      eX2R                  UR                  U[	        U5      -
  5      -  nUR                  SU5      n[	        U5      nUS:  a  M�  USU nUR                  SS5      u  pg [        U5        [        U5      n	U	(       d)  [        S
R                  UR                  S5      5      5      eU	" 5       $ ! [         a  n[        S	U 35      UeSnAff = f)zCParse a legacy object header, creating it but not reading the file.i    r5   r®   z"object header exceeds maximum sizeúInvalid object header, no \0Nr­   rF   zObject size not an integer: zNot a known type: {}rŠ   )rj   rk   rl   rÑ   rp   rn   rm   rM   ÚsplitÚintr{   r'   Úformatr�   )
r  Ú
header_maxÚdecompÚheaderÚstartÚendr°   Úsizer„   Ú	obj_classs
             ra   Ú_parse_legacy_object_headerÚ#ShaFile._parse_legacy_object_header  sa  € ð
 ˆ
Ü×#Ò#Ó%ˆð ×"Ñ" 5Ó5ˆØˆØ�k‰k˜% Ó'ˆÜ�F“ˆØ�A‹gÜ�6‹{˜jÓ(Ü—j’jÐ!EÓFÐFØ×)×)Ü+Ð,KÓLÐLØ×'Ñ'Ø×&Ñ&¨
´S¸³[Ñ(@óñ ˆFð —+‘+˜e UÓ+ˆCÜ˜“KˆEð �A�gð ˜˜�ˆØ Ÿ,™, t¨QÓ/‰ˆ	ð	WÜ�ŒIô ! Ó+ˆ	ÞÜ'Ø&×-Ñ-¨i×.>Ñ.>¸wÓ.GÓHóð ñ ‹{Ðøô ó 	WÜ'Ð*FÀsÀeÐ(LÓMÐSVÐVûð	Wús   Ã8E Å
E#ÅEÅE#Úmaprh   c                 ó†   • [        XS9nUR                  S5      nUS:  a  [        S5      eU R                  X4S-   S 5        g)z.Parse a legacy object, setting the raw string.©rh   r®   r5   r  rF   N)rs   rÑ   rM   Úset_raw_string)rá   r  rh   ÚtextÚ
header_ends        ra   Ú_parse_legacy_objectÚShaFile._parse_legacy_object+  sG   € ô ˜3Ñ2ˆØ—Y‘Y˜uÓ%ˆ
Ø˜‹>Ü'Ð(GÓHÐHØ×Ñ˜D¨a¡Ð!1Ð2Õ3r`   Úcompression_levelc              #   óò   #   • [         R                  " U5      nUR                  U R                  5       5      v •  U R	                  5        H  nUR                  U5      v •  M     UR                  5       v •  g7f)z\Return chunks representing the object in the experimental format.

Returns: List of strings
N)rj   ÚcompressobjÚcompressÚ_headerÚas_raw_chunksro   )rá   r  ÚcompobjÚchunks       ra   Úas_legacy_object_chunksÚShaFile.as_legacy_object_chunks7  s_   é € ô
 ×"Ò"Ð#4Ó5ˆØ×Ñ˜tŸ|™|›~Ó.Ò.Ø×'Ñ'Ö)ˆEØ×"Ñ" 5Ó)Ô)ñ *à�m‰m‹oÓùs   ‚A5A7c                 ó>   • SR                  U R                  US95      $ )zAReturn string representing the object in the experimental format.r`   )r  )r�   r$  )rá   r  s     ra   Úas_legacy_objectÚShaFile.as_legacy_objectB  s%   € à�x‰xØ×(Ñ(Ð;LÐ(ÐMó
ð 	
r`   c                 ó    • U R                   (       a#  SU l        U R                  5       U l        SU l         U R                  c   eU R                  $ )zhReturn chunks with serialization of the object.

Returns: List of strings, not necessarily one per line
NF)rº   rß   Ú
_serializer   rå   s    ra   r!  ÚShaFile.as_raw_chunksH  sI   € ð
 ×$×$ØˆDŒIØ!%§¡Ó!2ˆDÔØ(-ˆDÔ%Ø×!Ñ!Ñ-Ð-Ð-Ø×!Ñ!Ð!r`   c                 ó@   • SR                  U R                  5       5      $ )zLReturn raw string with serialization of the object.

Returns: String object
r`   )r�   r!  rå   s    ra   Úas_raw_stringÚShaFile.as_raw_stringT  s   € ð
 �x‰x˜×*Ñ*Ó,Ó-Ð-r`   c                 ó"   • U R                  5       $ )z/Return raw string serialization of this object.©r-  rå   s    ra   Ú	__bytes__ÚShaFile.__bytes__[  s   € à×!Ñ!Ó#Ð#r`   c                 ó,   • [        U R                  5      $ )z#Return unique hash for this object.)ÚhashÚidrå   s    ra   Ú__hash__ÚShaFile.__hash___  s   € ä�D—G‘G‹}Ðr`   c                 óB   • U R                  5       R                  SS5      $ )z:Return a string representing this object, fit for display.rÖ   Úreplace)r-  r�   rå   s    ra   Úas_pretty_stringÚShaFile.as_pretty_stringc  s   € à×!Ñ!Ó#×*Ñ*¨7°IÓ>Ð>r`   ©Ú
verify_shar  rt   r=  c                ón   • [        U[        5      (       d  [        SU< 35      eU R                  U/X#S9  g)z9Set the contents of this object from a serialized string.zExpected bytes for text, got r<  N)r�   r‚   r€   Úset_raw_chunks)rá   r  rt   r=  s       ra   r  ÚShaFile.set_raw_stringg  s9   € ô ˜$¤×&Ñ&ÜÐ;¸D¹8ÐDÓEÐEØ×Ñ˜T˜F CÐÒ?r`   )r  r=  Úchunksc                ó(  • Ub  Ub  [        S5      eXl        Ub  X0l        Uc  SU l        O[	        U5      U l        U R                  U5        SU l        Ub<  U R                  U R                  5      nXT:w  a  [        XE5      e[	        U5      U l        gg)aÖ  Set the contents of this object from a list of chunks.

Args:
  chunks: The raw uncompressed contents.
  sha: Optional known, trusted sha for the object. Cached without
    being checked against the contents.
  object_format: Optional hash algorithm for the object.
  verify_sha: Optional sha that the contents are checked against;
    raises ChecksumMismatch if the object does not hash to it. On
    success it is cached like ``sha``. Mutually exclusive with ``sha``.
Nz)sha and verify_sha are mutually exclusiveF)	r{   r   r  rß   r   Ú_deserializerº   Úget_idrG   )rá   rA  rt   r  r=  Úgots         ra   r?  ÚShaFile.set_raw_chunkss  s•   € ð& ‰?˜zÑ5ÜÐHÓIÐIØ#ÔàÑ$Ø!.Ôà‰;ØˆD�Iä  ›ˆDŒIØ×Ñ˜&Ô!Ø$)ˆÔ!ØÑ!Ø—+‘+˜d×0Ñ0Ó1ˆCØÓ Ü& zÓ7Ð7Ü  Ó,ˆD�Ið	 "r`   ÚfrS   c                 óx   • [        U SS 5      S-	  S-  n[        U5      nU(       d  [        SU 35      eU" 5       $ )z?Parse a new style object, creating it but not reading the file.r5   rF   é   é   zNot a known type )Úordr'   rM   )r  rG  r©   r  s       ra   Ú_parse_object_headerÚShaFile._parse_object_header™  sE   € ô
 ˜˜a ˜
“O qÑ(¨AÑ-ˆÜ  Ó*ˆ	ÞÜ'Ð*;¸H¸:Ð(FÓGÐGÙ‹{Ðr`   c                 ó®   • [        USS 5      nSnUS-  S:w  a   [        XUS-    5      nUS-  nUS-  S:w  a  M   XS nU R                  [        XRS95        g)z-Parse a new style object, setting self._text.r5   rF   é€   Nr  )rK  r  rs   )rá   r  rh   ÚbyteÚusedÚraws         ra   Ú_parse_objectÚShaFile._parse_object¤  sl   € ô �3�q˜�8‹}ˆØˆØ�d‰{˜qÓ Ü�s $¨¡(Ð+Ó,ˆDØ�A‰IˆDð �d‰{˜qÕ ð �%ˆjˆØ×ÑœK¨Ñ?Õ@r`   c                 óx   • [        USS 5      n[        USS 5      nUS-  U-   nUS-  S:H  =(       a    US-  S:H  $ )Nr5   rF   r‹   é   é�   é   )rK  )r±   r  Úb0Úb1Úwords        ra   Ú_is_legacy_objectÚShaFile._is_legacy_object´  sJ   € ä��q˜�‹_ˆÜ��q˜�‹_ˆØ�a‘˜2‰~ˆØ�T‘	˜dÑ"×7¨¨r©	°aÑ'7Ð7r`   ©r  rh   c                ó  • UR                  5       nU(       d  [        S5      eU R                  U5      (       a+  U R                  U5      nUb  X%l        UR                  XCS9  U$ U R                  XA5      nUb  X%l        UR                  XCS9  U$ )NzCorrupted empty file detectedr  )Úreadr   r\  r  r  r  rL  rS  )r±   rG  r  rh   r  rµ   s         ra   Ú_parse_fileÚShaFile._parse_file»  s—   € ð �f‰f‹hˆÞÜ$Ð%DÓEÐEà× Ñ  ×%Ñ%Ø×1Ñ1°#Ó6ˆCØÑ(Ø$1Ô!Ø×$Ñ$ SÐ$Ñ<ð ˆ
ð	 ×*Ñ*¨3Ó2ˆCØÑ(Ø$1Ô!Ø×Ñ˜cÐÑ5Øˆ
r`   c                 ó,   • [        U R                  5      e©N)ÚNotImplementedErrorrC  ©rá   rA  s     ra   rC  ÚShaFile._deserializeÓ  s   € Ü! $×"3Ñ"3Ó4Ð4r`   c                 ó,   • [        U R                  5      erd  )re  r*  rå   s    ra   r*  ÚShaFile._serializeÖ  s   € Ü! $§/¡/Ó2Ð2r`   rˆ   c                óp   • [        US5       nU R                  XRX4S9sSSS5        $ ! , (       d  f       g= f)zOpen a SHA file from disk.Úrbr^  N)rN   Ú	from_file)r±   rˆ   rt   r  rh   rG  s         ra   Ú	from_pathÚShaFile.from_pathÙ  s,   € ô �T˜4Ô  AØ—=‘= °}�=ÐX÷ !× × ús   �'§
5c          	      ó:  •  UbF  UbC  UR                   n[        U5      U:w  a(  [        S[        U5       SUR                   SU S35      eU R	                  XUS9nUb  [        U5      Ul        U$ SUl        U$ ! [        [        4 a  n[        S5      UeSnAff = f)z'Get the contents of a SHA file on disk.NzSHA length z doesn't match hash algorithm z (expected Ú)r^  zinvalid object header)	Ú
hex_lengthrp   r{   r²   ra  r   rß   Ú
IndexErrorrM   )r±   rG  rt   r  rh   Úexpected_lenrµ   r„   s           ra   rl  ÚShaFile.from_fileæ  s¼   € ð	Jà‰ =Ñ#<Ø,×7Ñ7�Ü�s“8˜|Ó+Ü$Ø%¤c¨#£h ZÐ/MØ(×-Ñ-Ð.¨k¸,¸ÀqðJóð ð
 —/‘/ !È8�/ÐTˆCØ‰Ü# C›=�”ð ˆJð  �”ØˆJøÜœJÐ'ó 	JÜ'Ð(?Ó@ÀcÐIûð	Jús   ‚A-A9 Á0A9 Á9BÂ	BÂBrg   c                ó~   • [        U 5      nUc  [        SU  35      eU" 5       nUb  X6l        UR                  XUS9  U$ )aŽ  Creates an object of the indicated type from the raw string given.

Args:
  type_num: The numeric type of the object.
  string: The raw uncompressed contents.
  sha: Optional known, trusted sha for the object.
  object_format: Optional hash algorithm for the object
  verify_sha: Optional sha to check the contents against; raises
    ChecksumMismatch on mismatch. Mutually exclusive with ``sha``.
r¬   r<  )r'   r¯   r  r  )r  rg   rt   r  r=  r±   rµ   s          ra   Úfrom_raw_stringÚShaFile.from_raw_string  sQ   € ô& ˜8Ó$ˆØ‰;Ü Ð#?À¸zÐ!JÓKÐKÙ‹eˆØÑ$Ø -ÔØ×Ñ˜6°:ÐÑ>Øˆ
r`   ©r  c                ól   • [        U 5      nUc  [        SU  35      eU" 5       nUR                  XUS9  U$ )a�  Creates an object of the indicated type from the raw chunks given.

Args:
  type_num: The numeric type of the object.
  chunks: An iterable of the raw uncompressed contents.
  sha: Optional known sha for the object
  object_format: Optional object format (hash algorithm) for the object.
    Required for trees in SHA-256 repositories so entry parsing uses
    the correct OID length.
r¬   rx  )r'   r¯   r?  )r  rA  rt   r  r±   rµ   s         ra   Úfrom_raw_chunksÚShaFile.from_raw_chunks  sE   € ô$ ˜8Ó$ˆØ‰;Ü Ð#?À¸zÐ!JÓKÐKÙ‹eˆØ×Ñ˜6°mÐÑDØˆ
r`   c                 ó6   • U " 5       nUR                  U5        U$ )zCreate a ShaFile from a string.©r  )r±   rg   rµ   s      ra   Úfrom_stringÚShaFile.from_string8  s   € ñ ‹eˆØ×Ñ˜6Ô"Øˆ
r`   ÚmemberrÇ   c                 ó4   • [        XS5      c  [        U5      eg)a  Check that the object has a given member variable.

Args:
  member: the member variable to check for
  error_msg: the message for an error if the member is missing
Raises:
  ObjectFormatException: with the given error_msg if member is
    missing or is None
N)r¾   rM   )rá   r€  rÇ   s      ra   Ú_check_has_memberÚShaFile._check_has_member?  s!   € ô �4 Ó&Ñ.Ü'¨	Ó2Ð2ð /r`   c                 óÞ   • U R                   n U R                  U R                  5       5        SU l        U R                   nX:w  a  [        X!5      eg! [         a  n[        U5      UeSnAff = f)zÓCheck this object for internal consistency.

Raises:
  ObjectFormatException: if the object is malformed in some way
  ChecksumMismatch: if the object was created with a SHA that does
    not match its contents
N)r5  rC  r!  rß   Ú	ExceptionrM   rG   )rá   Úold_shaÚnew_shar„   s       ra   ÚcheckÚShaFile.checkL  sp   € ð —'‘'ˆð	6Ø×Ñ˜d×0Ñ0Ó2Ô3ØˆDŒIØ—g‘gˆGð ÓÜ" 7Ó4Ð4ð øô ó 	6Ü'¨Ó,°#Ð5ûð	6ús   Ž2A Á
A,ÁA'Á'A,c                 óJ   • [        U R                  U R                  5       5      $ rd  )r(   r  Ú
raw_lengthrå   s    ra   r   ÚShaFile._headerb  s   € Ü˜TŸ]™]¨D¯O©OÓ,=Ó>Ð>r`   c                 óP   • [        [        [        U R                  5       5      5      $ )z4Returns the length of the raw string of this object.)Úsumr  rp   r!  rå   s    ra   r‹  ÚShaFile.raw_lengthe  s   € ä”3”s˜D×.Ñ.Ó0Ó1Ó2Ð2r`   zFixedSha | HASHc                 ó¼  • UbY  UR                  5       nUR                  U R                  5       5        U R                  5        H  nUR                  U5        M     U$ U R                  b  U R
                  (       aW  [        5       nUR                  U R                  5       5        U R                  5        H  nUR                  U5        M     X l        U R                  $ )z{The SHA object that is the name of this object.

Args:
    object_format: Optional HashAlgorithm to use. Defaults to SHA1.
)Únew_hashÚupdater   r!  rß   rº   r@   )rá   r  r‡  r#  s       ra   rt   ÚShaFile.shai  s©   € ð Ñ$Ø#×,Ñ,Ó.ˆGØ�N‰N˜4Ÿ<™<›>Ô*Ø×+Ñ+Ö-�Ø—‘˜uÖ%ñ .àˆNð �9‰9Ñ × 9× 9ä“fˆGØ�N‰N˜4Ÿ<™<›>Ô*Ø×+Ñ+Ö-�Ø—‘˜uÖ%ñ .àŒIØ�y‰yÐr`   c                 óÞ   • [        U R                  5      nUc  [        SU R                   35      eUR                  U R                  U R	                  5       U R
                  U R                  S9$ )z:Create a new copy of this SHA1 object from its raw string.zinvalid type num rx  )r'   r  r¯   rv  r-  r5  r  )rá   r  s     ra   ÚcopyÚShaFile.copy�  sh   € ä  §¡Ó/ˆ	ØÑÜ Ð#4°T·]±]°OÐ!DÓEÐEØ×(Ñ(Ø�M‰MØ×ÑÓ Ø�G‰GØ×,Ñ,ð	 )ð 
ð 	
r`   c                 ón   • [        U R                  5       R                  5       R                  S5      5      $ )z˜The hex SHA1 of this object.

For SHA256 repositories, use get_id(object_format) instead.
This property always returns SHA1 for backward compatibility.
rŠ   )r   rt   ré   r�   rå   s    ra   r5  Ú
ShaFile.id�  s)   € ô ˜Ÿ™›
×,Ñ,Ó.×5Ñ5°gÓ>Ó?Ð?r`   c                 ó^   • U R                  U5      R                  5       R                  S5      $ )a+  Get the hex SHA of this object using the specified hash algorithm.

Args:
    object_format: Optional HashAlgorithm to use. Defaults to SHA1.

Example:
    >>> blob = Blob()
    >>> blob.data = b"Hello, World!"
    >>> blob.id  # Always returns SHA1 for backward compatibility
    b'4ab299c8ad6ed14f31923dd94f8b5f5cb89dfb54'
    >>> blob.get_id()  # Same as .id
    b'4ab299c8ad6ed14f31923dd94f8b5f5cb89dfb54'
    >>> from dulwich.object_format import SHA256
    >>> blob.get_id(SHA256)  # Get SHA256 hash
    b'03ba204e2f2e707...'  # 64-character SHA256
rŠ   )rt   ré   r�   )rá   r  s     ra   rD  ÚShaFile.get_id–  s'   € ð" �x‰x˜Ó&×0Ñ0Ó2×9Ñ9¸'ÓBÐBr`   c                 óR   • SU R                   R                   SU R                  < S3$ )z,Return string representation of this object.Ú<rÉ   Ú>)Ú	__class__rZ   r5  rå   s    ra   Ú__repr__ÚShaFile.__repr__©  s&   € à�4—>‘>×*Ñ*Ð+¨1¨T¯W©W©K°qÐ9Ð9r`   Úotherc                 ól   • [        U[        5      (       + =(       d    U R                  UR                  :g  $ )z3Check whether this object does not match the other.©r�   r   r5  ©rá   r¡  s     ra   Ú__ne__ÚShaFile.__ne__­  s$   € ä˜e¤WÓ-Ô-×D°·±¸E¿H¹HÑ1DÐDr`   c                 ób   • [        U[        5      =(       a    U R                  UR                  :H  $ )z1Return True if the SHAs of the two objects match.r£  r¤  s     ra   Ú__eq__ÚShaFile.__eq__±  s!   € ä˜%¤Ó)×A¨d¯g©g¸¿¹Ñ.AÐAr`   c                 ój   • [        U[        5      (       d  [        eU R                  UR                  :  $ )z9Return whether SHA of this object is less than the other.©r�   r   r€   r5  r¤  s     ra   Ú__lt__ÚShaFile.__lt__µ  s'   € ä˜%¤×)Ñ)ÜˆOØ�w‰w˜Ÿ™Ñ!Ð!r`   c                 ój   • [        U[        5      (       d  [        eU R                  UR                  :*  $ )zDCheck whether SHA of this object is less than or equal to the other.r«  r¤  s     ra   Ú__le__ÚShaFile.__le__»  s'   € ä˜%¤×)Ñ)ÜˆOØ�w‰w˜%Ÿ(™(Ñ"Ð"r`   ©rc   N)rÏ   rd  )rc   r   )=rZ   r[   r\   r]   r^   rë   ÚboolÚ__annotations__r‚   r	  ÚlistrQ   râ   Ústaticmethodr  r   r  r8   r$  r'  r!  r-  r1  r6  rŒ   r:  r   r   r  r?  r:   r<   rL  rS  Úclassmethodr\  ra  rC  r*  rm  rl  rv  rz  rC   r~  r‚  rˆ  r   r‹  rt   r•  rÃ   r5  rD  rŸ  rÂ   r¥  r¨  r¬  r¯  r_   rY   r`   ra   r   r   ó  sr  ‡ ÙàR€IàÓØÓØƒMØ˜‘; Ñ%Ó%Ø
"Ó"ØÓô3ð ð"¨5ð "°Yó "ó ð"ðN 8ñ
4àð
4ð ð
4ð 
õ	
4ñ	¸ð 	ÀhÈuÁoõ 	ñ
°#ð 
¸uõ 
ð
"˜t E™{ô 
"ð.˜uô .ð$˜5ô $ð˜#ô ð? #ô ?ð .2ð
@ð
 59ò
@àð
@ð ˜Ñ# dÑ*ð
@ð
 ˜{Ñ*¨TÑ1ð
@ð 
ö
@ð .2ð$-ð
 .2Ø48ò$-à�U‘ð$-ð ˜Ñ# dÑ*ð$-ð
 $ dÑ*ð$-ð ˜{Ñ*¨TÑ1ð$-ð 
ö$-ðL ðØðØ'¨"¨U©)Ñ3°jÑ@ðà	óó ðð 8ñAàðAð ðAð 
õ	Að  ð8 eð 8°ó 8ó ð8ð ð
 .2Ø7òà˜B˜u™IÑ%¨
Ñ2ðð $ dÑ*ð	ð
 ðð 
ôó ðð.5 4¨¡;ð 5°4ô 5ð3˜D ™Kô 3ð ð  $ð
Yð
 .2Ø7ò
Yà�E‰kð
Yð ˜‰_ð
Yð
 $ dÑ*ð
Yð ð
Yð 
õ
Yó ð
Yð ð  $ðJð
 .2Ø7òJà˜B˜u™IÑ%¨
Ñ2ðJð ˜‰_ðJð
 $ dÑ*ðJð ðJð 
õJó ðJð8 ð .2ðð
 .2Ø48òØðàðð ˜Ñ# dÑ*ðð
 $ dÑ*ðð ˜{Ñ*¨TÑ1ðð 
õó ðð6 ð .2ðð
 .2òØðà�U‘ðð ˜Ñ# dÑ*ðð
 $ dÑ*ðð 
õó ðð0 ð ð ¨4ó ó ðð3¨ð 3¸ð 3Àô 3ô5ð,?˜ô ?ð3˜Cô 3ñ °Ñ!4ð Ð@Qõ ô0

ð ð@�Hó @ó ð@ñC L°4Ñ$7ð CÀ5õ Cð&:˜#ô :ðE˜Fð E tô EðB˜Fð B tô Bð"˜Fð " tô "ð#˜Fð # t÷ #r`   c                   ór  ^ • \ rS rSrSrSrSrSrSU 4S jjr\	S\
4S	 j5       r\R                  S
\
SS4S j5       r\	S\\
   4S j5       r\R                  S\\
   SS4S j5       rS\\
   4S jrS\\
   SS4S jr\ SS\S.S\\
-  S\S-  S\S-  S\SS 4
S jjj5       rSU 4S jjrS\\
   4S jrSrU =r$ )r   iÂ  zA Git Blob object.rY   r÷   rA   rc   Nc                 ó>   >• [         TU ]  5         / U l        SU l        g)zInitialize a new Blob object.FN)Úsuperrâ   r   rº   ©rá   rž  s    €ra   râ   ÚBlob.__init__Ê  s   ø€ ä‰ÑÔØˆÔØ$)ˆÕ!r`   c                 ó"   • U R                  5       $ )z*The text contained within the blob object.r0  rå   s    ra   ÚdataÚ	Blob.dataÐ  s   € ð ×!Ñ!Ó#Ð#r`   r½  c                 ó&   • U R                  U5        g rd  r}  )rá   r½  s     ra   r½  r¾  Õ  s   € à×Ñ˜DÕ!r`   c                 ó8   • U R                   c   eU R                   $ )z?The text in the blob object, as chunks (not necessarily lines).©r   rå   s    ra   ÚchunkedÚBlob.chunkedÙ  s"   € ð ×!Ñ!Ñ-Ð-Ð-Ø×!Ñ!Ð!r`   rA  c                 ó   • Xl         g rd  rÁ  rf  s     ra   rÂ  rÃ  ß  s   € à#Õr`   c                 ó8   • U R                   c   eU R                   $ rd  rÁ  rå   s    ra   r*  ÚBlob._serializeã  s    € Ø×!Ñ!Ñ-Ð-Ð-Ø×!Ñ!Ð!r`   c                 ó   • Xl         g rd  rÁ  rf  s     ra   rC  ÚBlob._deserializeç  s   € Ø#Õr`   r^  rˆ   rt   r  rh   c                óv   • [         R                  XX4S9n[        XP5      (       d  [        [	        U5      5      eU$ )a  Read a blob from a file on disk.

Args:
  path: Path to the blob file
  sha: Optional known SHA for the object
  object_format: Optional object format to use
  max_size: Maximum inflated size in bytes

Returns:
  A Blob object

Raises:
  NotBlobError: If the file is not a blob
r^  )r   rm  r�   rI   rØ   )r±   rˆ   rt   r  rh   Úblobs         ra   rm  ÚBlob.from_pathê  ó@   € ô. × Ñ Ø ]ð !ð 
ˆô ˜$×$Ñ$Üœ~¨dÓ3Ó4Ð4Øˆr`   c                 ó"   >• [         TU ]  5         g)úuCheck this object for internal consistency.

Raises:
  ObjectFormatException: if the object is malformed in some way
N)r¹  rˆ  rº  s    €ra   rˆ  Ú
Blob.check  s   ø€ ô 	‰‰�r`   c                 óâ  • U R                   nU(       d  / $ [        U5      S:X  a  US   R                  S5      nU$ Sn/ nU H–  nUR                  S5      n[        U5      S:”  a;  UR                  U=(       d    SUS   -   5        UR	                  USS 5        US   nM^  [        U5      S:X  d  Mo  Uc  UR                  5       nM„  X6R                  5       -  nM˜     Ub  UR                  U5        U$ )zNReturn list of lines in this blob.

This preserves the original line endings.
rF   r5   TNr`   rÏ   )rÂ  rp   Ú
splitlinesÚappendÚextendÚpop)rá   rA  r”   Ú	remainingÚretr#  Úliness          ra   rÑ  ÚBlob.splitlines  sá   € ð
 —‘ˆÞØˆIÜˆv‹;˜!ÓØ"(¨¡)×"6Ñ"6°tÓ"<ˆFØˆMØˆ	ØˆÛˆEØ×$Ñ$ TÓ*ˆEÜ�5‹z˜A‹~Ø—
‘
˜I×,¨°°a±Ñ8Ô9Ø—
‘
˜5  2˜;Ô'Ø! "™I’	Ü�U“˜q•ØÑ$Ø %§	¡	£’Ià§¡£Ñ,’Iñ ð Ñ Ø�J‰J�yÔ!Øˆ
r`   )r   rº   r±  rd  )rZ   r[   r\   r]   r^   rë   r°   r  râ   rÃ   r‚   r½  Úsetterr´  rÂ  r*  rC  r¶  r   rŒ   r   rQ   r	  rm  rˆ  rÑ  r_   Ú__classcell__©rž  s   @ra   r   r   Â  sH  ø† Ùà€Ià€IØ€H÷*ð ð$�eó $ó ð$ð 
‡[�[ð"˜ð " 4ó "ó ð"ð ð"˜˜e™ó "ó ð"ð
 ‡^�^ð$˜d 5™kð $¨dó $ó ð$ð"˜D ™Kô "ð$ 4¨¡;ð $°4ô $ð ð  $ðð
 .2Ø7òà�E‰kðð ˜‰_ðð
 $ dÑ*ðð ðð 
õó ð÷:ð˜D ™K÷ ò r`   rA  ©NNc              #   óì  #   • [        SR                  U 5      5      nSn/ nSnS[        S[        4S jnU Hk  nUR                  S5      (       a  UR	                  USS 5        M/  Ub  X%" SR                  U5      5      4v •  US	:X  a    O>UR                  SS5      u  p'U/nMm     S
nUb  X%" SR                  U5      5      4v •  Sv •  U(       d  SUR                  5       4v •  UR                  5         g7f)a9  Parse a message with a list of fields and a body.

Args:
  chunks: the raw chunks of the tag or commit object.
Returns: iterator of tuples of (field, value), one per header line, in the
    order read from the text, possibly including duplicates. Includes a
    field named None for the freeform tag/commit text.
r`   NFr¶   rc   c                 óJ   • U (       a  U R                  S5      (       a  U SS $ U $ )z"Strip the last newline from value.rÐ   NrÏ   )Úendswith)r¶   s    ra   Ú_strip_last_newlineÚ+_parse_message.<locals>._strip_last_newline=  s$   € æ�U—^‘^ E×*Ñ*Ø˜˜"�:ÐØˆr`   r­   rF   rÐ   TrÜ  )r;   r�   r‚   Ú
startswithrÒ  r  r`  Úclose)rA  rG  ÚkÚvÚeofrà  Úliner¥   s           ra   Ú_parse_messagerè  -  sô   é € ô 	�—‘˜Ó Ó!€AØ€AØ€AØ
€Cð¤5ð ¬Uô ó ˆØ�?‰?˜4× Ñ à�H‰H�T˜!˜"�XÖà‰}àÐ-¨c¯h©h°q«kÓ:Ð;Ò;Ø�u‹}áØŸ
™
 4¨Ó+‰IˆQØ�ŠAñ ð$ ˆØ‰=ØÐ)¨#¯(©(°1«+Ó6Ð7Ò7ØÒæð �Q—V‘V“XÐÒà‡G�G…Iùs   ‚C2C4ÚheadersÚbodyc              #   ó°   #   • U  H<  u  p#UR                  S5      n[        X$S   5      v •  USS   H  nSU-   S-   v •  M     M>     Sv •  U(       a  Uv •  g g 7f)NrÐ   r5   rF   r­   )r  r   )ré  rê  Úfieldr¶   r×  rç  s         ra   Ú_format_messagerí  i  sc   é € ó  ‰ˆØ—‘˜EÓ"ˆÜ�u A™hÓ'Ò'Ø˜!˜"“IˆDØ˜‘+ Ñ%Ô%ó ñ  ð
 ‚KÞØ‹
ð ùs   ‚AAc                 óÈ   • SnSnU[        U 5      :  aN  U R                  [        U5      (       a  UnU R                  SU5      nUS:X  a   U$ US-   nU[        U 5      :  a  MN  U$ )z>Find the offset of the last line starting a signature, if any.Nr5   rÐ   rÏ   rF   )rp   râ  Ú_SIGNATURE_MARKERSrÑ   )rê  ÚmatchÚposÚnls       ra   Ú_find_signatureró  v  sl   € à€EØ
€CØ
”�D“	‹/Ø�?‰?Ô-¨s×3Ñ3ØˆEØ�Y‰Y�u˜cÓ"ˆØ�‹8Øà€Lð �1‰fˆð ”�D“	�/ð €Lr`   c                   óp  ^ • \ rS rSr% SrSrSrSr\\	\
\
4      \S'   \
S-  \S'   \
S-  \S	'   S
\S'   \
S-  \S'   \
S-  \S'   \S-  \S'   \S-  \S'   \S-  \S'   \
S-  \S'   S0U 4S jjr\ S1S\S.S\\
-  S\S-  S\S-  S\SS 4
S jjj5       rS0U 4S jjrS\\
   4S jrS\\
   SS4S jr\S\	\\   \4   4S j5       r\R8                  S\	\\   \
4   SS4S  j5       r\" S!S"5      r\" S#S$5      r\" S%S&5      r \" S'S(5      r!\" S)S*5      r"\" S+S,5      r#S\
4S- jr$S\	\
\
S-  \
S-  4   4S. jr%S/r&U =r'$ )2r   i„  zA Git Tag object.rV   rI  )
Ú_extraÚ_messageÚ_nameÚ_object_classÚ_object_shaÚ
_signatureÚ	_tag_timeÚ_tag_timezoneÚ_tag_timezone_neg_utcÚ_taggerrõ  Nrö  r÷  ztype[ShaFile] | Nonerø  rù  rú  rû  rü  rý  rþ  rc   c                 óv   >• [         TU ]  5         / U l        SU l        SU l        SU l        SU l        SU l        g)zInitialize a new Tag object.NF)r¹  râ   rõ  rþ  rû  rü  rý  rú  rº  s    €ra   râ   ÚTag.__init__¢  s:   ø€ ä‰ÑÔØˆŒØˆŒØˆŒØ!ˆÔØ%*ˆÔ"Ø(,ˆ�r`   r^  rˆ   rt   r  rh   c                óv   • [         R                  XX4S9n[        XP5      (       d  [        [	        U5      5      eU$ )a  Read a tag from a file on disk.

Args:
  path: Path to the tag file
  sha: Optional known SHA for the object
  object_format: Optional object format to use
  max_size: Maximum inflated size in bytes

Returns:
  A Tag object

Raises:
  NotTagError: If the file is not a tag
r^  )r   rm  r�   rK   rØ   )r±   rˆ   rt   r  rh   Útags         ra   rm  ÚTag.from_path¬  s@   € ô. ×ÑØ ]ð  ð 
ˆô ˜#×#Ñ#Üœn¨TÓ2Ó3Ð3Øˆ
r`   c                 ó2  >• [         TU ]  5         U R                  c   eU R                  SS5        U R                  SS5        U R                  SS5        U R                  (       d  [        S5      eU R                  c  [        S5      e[        U R                  S	5        U R                  b  [        U R                  S
5        U R                  SS5        U R                  c  [        S5      e[        U R                  5        Sn[        U R                  5       H|  u  p#U[        :X  a  Ub  [        S5      eU[        :X  a  U[        :w  a  [        S5      eU[        :X  a  U[        :w  a  [        S5      eU[         :X  a  U[        :w  a  [        S5      eUnM~     g)rÎ  Nrù  úmissing object sharø  zmissing object typer÷  úmissing tag namezempty tag nameúinvalid object shazinvalid taggerrû  zmissing tag timezunexpected objectzunexpected typezunexpected tag namezunexpected tagger)r¹  rˆ  r   r‚  r÷  rM   rù  r   rþ  r   rû  r   rè  Ú_OBJECT_HEADERÚ_TYPE_HEADERÚ_TAG_HEADERÚ_TAGGER_HEADER)rá   Úlastrì  r¸   rž  s       €ra   rˆ  Ú	Tag.checkÊ  sf  ø€ ô 	‰‰ŒØ×!Ñ!Ñ-Ð-Ð-Ø×Ñ˜}Ð.BÔCØ×Ñ˜Ð0EÔFØ×Ñ˜wÐ(:Ô;à�z�zÜ'Ð(8Ó9Ð9à×ÑÑ#Ü'Ð(<Ó=Ð=Ü�T×%Ñ%Ð';Ô<à�<‰<Ñ#Ü˜4Ÿ<™<Ð)9Ô:à×Ñ˜{Ð,>Ô?Ø�>‰>Ñ!Ü'Ð(:Ó;Ð;Ü�4—>‘>Ô"àˆÜ& t×'9Ñ'9Ö:‰HˆEØœÓ&¨4Ñ+;Ü+Ð,?Ó@Ð@Øœ,Ó&¨4´>Ó+AÜ+Ð,=Ó>Ð>Øœ+Ó%¨$´,Ó*>Ü+Ð,AÓBÐBØœ.Ó(¨T´[Ó-@Ü+Ð,?Ó@Ð@ØŠDò ;r`   c           	      óÀ  • / nU R                   c  [        S5      eUR                  [        U R                   45        U R                  c  [        S5      eUR                  [
        U R                  R                  45        U R                  c  [        S5      eUR                  [        U R                  45        U R                  (       a   U R                  c"  UR                  [        U R                  45        OqU R                  b  U R                  c  [        S5      eUR                  [        [        U R                  U R                  U R                  U R                  45      45        UR                  U R                   5        U R"                  c  U R$                  c  S nO+U R"                  =(       d    SU R$                  =(       d    S-   n['        [)        X5      5      $ )Nr  zmissing object classr  zmissing timezone infor`   )rù  rM   rÒ  r  rø  r	  r°   r÷  r
  rþ  rû  r  rü  rý  r   rÓ  rõ  Úmessagerú  r´  rí  )rá   ré  rê  s      ra   r*  ÚTag._serializeñ  ss  € ØˆØ×ÑÑ#Ü'Ð(<Ó=Ð=Ø�‰œ¨×(8Ñ(8Ð9Ô:Ø×ÑÑ%Ü'Ð(>Ó?Ð?Ø�‰œ d×&8Ñ&8×&BÑ&BÐCÔDØ�:‰:ÑÜ'Ð(:Ó;Ð;Ø�‰œ T§Z¡ZÐ0Ô1Ø�<�<Ø�~‰~Ñ%Ø—‘¤°·±Ð=Õ>à×%Ñ%Ñ-°×1KÑ1KÑ1SÜ/Ð0GÓHÐHØ—‘ä&Ü)Ø ŸL™LØ ŸN™NØ!×/Ñ/°×1KÑ1KÐLóðô	ð 	�‰�t—{‘{Ô#à�<‰<Ñ D§O¡OÑ$;Ø‰Dà—L‘L×' C¨D¯O©O×,B¸sÑCˆDÜ”O GÓ2Ó3Ð3r`   rA  c                 óþ  ^	• SU l         SU l        SU l        / U l        SU l        SU l        SU l        SU l        [        U5      m	S[        S[        4U	4S jjnU" [        5      n[        US5        X0l         U" [        5      n[        U5      nU(       d  [        SU< 35      eXPl        U" [        5      U l        T	 H½  u  pgU[         :X  aE  Uc  [        S5      eU R                  c(  [#        U5      u  U l        U l        u  U l        U l        MR  MT  UcE  Uc  SU l        SU l        Mj  [)        U5      nUb  USU U l        XxS U l        M�  Xpl        SU l        Mœ  Uc   eU R                  R+                  Xg45        M¿     g)	z&Grab the metadata attached to the tag.NFr  rc   c                 óp   >• [        TS5      u  pX:w  d  Uc  [        SU R                  S5       S35      eU$ )N)r`   Nz	expected rŠ   z header)ÚnextrM   r�   )r  rì  r¶   Úfieldss      €ra   ÚrequiredÚ"Tag._deserialize.<locals>.required   s=   ø€ Ü ¨Ó4‰LˆEØ‹ %¡-Ü+¨i¸¿¹ÀgÓ8NÐ7OÈwÐ,WÓXÐXØˆLr`   r  zNot a known type: zmissing tagger value)rù  rø  r÷  rõ  rþ  rû  rü  rý  rè  r‚   r  r   r	  r'   rM   r
  r  r*   rö  rú  ró  rÒ  )
rá   rA  r  Ú
object_shar°   r  rì  r¶   Úsig_idxr  s
            @ra   rC  ÚTag._deserialize  s  ø€ àˆÔØ!ˆÔØˆŒ
ØˆŒØˆŒØˆŒØ!ˆÔØ%*ˆÔ"Ü Ó'ˆð	œUð 	¤u÷ 	ñ œnÓ-ˆ
Ü�ZÐ!5Ô6Ø%ÔÙœ\Ó*ˆ	Ü  Ó+ˆ	ÞÜ'Ð*<¸Y¹MÐ(JÓKÐKØ&ÔÙœkÓ*ˆŒ
ó #‰LˆEØœÓ&Ø‘=Ü/Ð0FÓGÐGØ—<‘<Ñ'ô
 )¨Ó/ñ	ØœØœÙH˜Ô+¨TÖ-Gñ	 (ð ‘Ø‘=Ø$(�D”MØ&*�D–Oä-¨eÓ4�GØÑ*Ø(-¨h¨w¨˜œØ*/°¨/˜žà(-œØ*.˜žàÑ(Ð(Ð(Ø—‘×"Ñ" E >Ö2ò1 #r`   c                 óŽ   • U R                   b  U R                  c  [        S5      eU R                   [        U R                  5      4$ )zOGet the object pointed to by this tag.

Returns: tuple of (object class, sha).
z&Tag object is not properly initialized)rø  rù  r{   r   rå   s    ra   rÂ   Ú
Tag.objectK  sC   € ð ×ÑÑ%¨×)9Ñ)9Ñ)AÜÐEÓFÐFØ×"Ñ"¤H¨T×-=Ñ-=Ó$>Ð?Ð?r`   r¶   c                 ó0   • Uu  U l         U l        SU l        g )NT)rø  rù  rº   ©rá   r¶   s     ra   rÂ   r  U  s   € à/4Ñ,ˆÔ˜DÔ,Ø$(ˆÕ!r`   r²   zThe name of this tagÚtaggerz3Returns the name of the person who created this tagÚtag_timezLThe creation timestamp of the tag.  As the number of seconds since the epochÚtag_timezonez!The timezone that tag_time is in.r  z the message attached to this tagÚ	signaturezOptional detached GPG signaturec                 óz   • U R                  5       nU R                  (       a  US[        U R                  5      *  nU$ )zŽReturn raw string serialization without the GPG/SSH signature.

self.signature is a signature for the returned raw byte string serialization.
N)r-  rú  rp   )rá   rÖ  s     ra   Úraw_without_sigÚTag.raw_without_sigi  s7   € ð
 × Ñ Ó"ˆØ�?�?ØÐ-œ˜TŸ_™_Ó-Ð-Ð.ˆCØˆ
r`   c                 ó@  • U R                   c  U R                  5       SS4$ U R                  5       nU R                   R                  [        5      (       a  [
        nO6U R                   R                  [        5      (       a  [        nO[        S5      eXR                   U4$ )a§  Extract the payload, signature, and signature type from this tag.

Returns:
  tuple of (``payload``, ``signature``, ``signature_type``) where:

  - ``payload``: The raw tag data without the signature
  - ``signature``: The signature bytes if present, None otherwise
  - ``signature_type``: SIGNATURE_PGP for PGP, SIGNATURE_SSH for SSH, None if no signature

Raises:
  ObjectFormatException: If signature has unknown format
NúUnknown signature format)	rú  r-  r#  râ  Ú_PGP_SIGNATURE_MARKERSr   r   r	   rM   ©rá   ÚpayloadÚsig_types      ra   Úextract_signatureÚTag.extract_signatures  s…   € ð �?‰?Ñ"Ø×%Ñ%Ó'¨¨tÐ3Ð3à×&Ñ&Ó(ˆð �?‰?×%Ñ%Ô&<×=Ñ=Ü$‰HØ�_‰_×'Ñ'Ô(;×<Ñ<Ü$‰Hä'Ð(BÓCÐCàŸ™¨Ð1Ð1r`   )rõ  rö  r÷  rº   rø  rù  rú  rû  rü  rý  rþ  r±  rd  )(rZ   r[   r\   r]   r^   r°   r  rë   r´  Útupler‚   r³  r	  r²  râ   r¶  r   rŒ   r   rQ   rm  rˆ  r*  rC  rÃ   rÄ   r   rÂ   rÙ  r0   r²   r  r  r   r  r!  r#  r+  r_   rÚ  rÛ  s   @ra   r   r   „  s
  ø‡ Ùà€IØ€Hð€Ið ��u˜e�|Ñ$Ñ%Ó%Ø�d‰lÓØ�4‰<ÓØ)Ó)Ø˜‘ÓØ˜‘ÓØ�T‰zÓØ˜‘:ÓØ $™;Ó&Ø�T‰\Ó÷-ð ð  $ðð
 .2Ø7òà�E‰kðð ˜‰_ðð
 $ dÑ*ðð ðð 
õó ð÷:%ðN!4˜D ™Kô !4ðF53 4¨¡;ð 53°4ô 53ðn ð@˜˜d 7™m¨XÐ5Ñ6ó @ó ð@ð ‡]�]ð)˜E $ w¡-°Ð"6Ñ7ð )¸Dó )ó ð)ñ ! Ð)?Ó@€DÙ"ØÐGó€Fñ %ØØVó€Hñ )ØÐ;ó€Lñ $ IÐ/QÓR€Gá% kÐ3TÓU€Ið ô ð2 5¨°¸±¸eÀd¹lÐ)JÑ#K÷ 2ò 2r`   c                   óJ   • \ rS rSr% Sr\\S'   \\S'   \\S'   S\SS 4S jr	Sr
g	)
r   i�  z.Named tuple encapsulating a single tree entry.rˆ   Úmodert   rc   c                 óÜ   • [        U R                  [        5      (       d  [        SU< 35      e[	        [
        R                  " XR                  5      U R                  U R                  5      $ )z:Return a copy of this entry with the given path prepended.zExpected bytes for path, got )	r�   rˆ   r‚   r€   r   Ú	posixpathr�   r/  rt   )rá   rˆ   s     ra   Úin_pathÚTreeEntry.in_path—  sJ   € ä˜$Ÿ)™)¤U×+Ñ+ÜÐ;¸D¹8ÐDÓEÐEÜœŸš¨¯i©iÓ8¸$¿)¹)ÀTÇXÁXÓNÐNr`   rY   N)rZ   r[   r\   r]   r^   r‚   r³  r	  r   r2  r_   rY   r`   ra   r   r   �  s*   ‡ Ù8à
ƒKØ
ƒIØ	ƒMðO˜Eð O k÷ Or`   r   F)Ústrictr  Úsha_lenr4  c             #   ó@  #   • Sn[        U 5      nX4:  aæ  U R                  SU5      nXU nU(       a%  UR                  S5      (       a  [        SU< 35      e [	        US5      nU R                  SU5      n	XS-   U	 n
Uc  [        S	5      eU	S-   U-   nX4:”  a  [        S
U SU 35      eX	S-   U n[        U5      U:w  a  [        S[        U5       SU 35      e[        [        U5      5      nX§U4v •  X4:  a  Må  gg! [
         a  n[        SU< 35      UeSnAff = f7f)a  Parse a tree text.

Args:
  text: Serialized text to parse
  sha_len: Length of the object IDs in bytes
  strict: Whether to be strict about format
Returns: iterator of tuples of (name, mode, sha)

Raises:
  ObjectFormatException: if the object was malformed in some way
r5   r­   ó   0zInvalid mode rV  Nr®   rF   zsha_len must be specifiedz'Tree entry extends beyond tree length: z > zSha has invalid length: z != )rp   Úindexrâ  rM   r	  r{   r2   r   )r  r5  r4  Úcountrª   Úmode_endÚ	mode_textr/  r„   Úname_endr²   rt   r|   s                ra   r.   r.   ž  sS  é € ð €EÜ�‹Y€Fà
‹.Ø—:‘:˜d EÓ*ˆØ˜xÐ(ˆ	Þ�i×*Ñ*¨4×0Ñ0Ü'¨-¸	±}Ð(EÓFÐFð	PÜ�y !Ó$ˆDð —:‘:˜e XÓ.ˆØ˜q‘L 8Ð,ˆà‰?Ü'Ð(CÓDÐDØ˜1‘˜wÑ&ˆØ‹>Ü'Ø9¸%¸ÀÀFÀ8ÐLóð ð ˜a‘< %Ð(ˆÜˆs‹8�wÓÜ'Ø*¬3¨s«8¨*°D¸¸	ÐBóð ô œK¨Ó,Ó-ˆØ˜6Ð"Ò"ð5 �.øô ó 	PÜ'¨-¸	±}Ð(EÓFÈCÐOûð	Püs1   ‚ADÁC< Á$BDÃ:DÃ<
DÄDÄDÄDc              #   óx   #   • U  H0  u  pnUS R                  S5      S-   U-   S-   [        U5      -   v •  M2     g7f)z�Serialize the items in a tree to a text.

Args:
  items: Sorted iterable over (name, mode, sha) tuples
Returns: Serialized tree text as chunks
Ú04orŠ   r­   r®   N)r�   r    )rÛ   r²   r/  r|   s       ra   r1   r1   Ì  sF   é € ó $Ñˆ�Fà�Sˆz×"Ñ" 7Ó+¨dÑ2°TÑ9¸EÑAÄJÈvÓDVÑVô	
ò $ùs   ‚8:ÚentriesÚ
name_orderc              #   óø   #   • U(       a  [         nO[        n[        U R                  5       US9 HF  u  p4Uu  pV[	        U5      n[        U[        5      (       d  [        SU< 35      e[        X5U5      v •  MH     g7f)a<  Iterate over a tree entries dictionary.

Args:
  name_order: If True, iterate entries in order of their name. If
    False, iterate entries in tree order, that is, treat subtree entries as
    having '/' appended.
  entries: Dictionary mapping names to (mode, sha) tuples
Returns: Iterator over (name, mode, hexsha)
)ÚkeyzExpected bytes for SHA, got N)	r&   r%   ÚsortedrÛ   r	  r�   r‚   r€   r   )r?  r@  Úkey_funcr²   Úentryr/  r|   s          ra   r3   r3   Ù  sj   é € ö Ü'‰äˆÜ˜gŸm™m›o°8Ô<‰ˆØ‰ˆä�4‹yˆÜ˜&¤%×(Ñ(ÜÐ:¸6¹*ÐEÓFÐFÜ˜ FÓ+Ô+ò =ùs   ‚A8A:rE  c                 óT   • U u  nu  p#[         R                  " U5      (       a  US-  nU$ )z=Sort key for tree entry.

Args:
  entry: (name, value) tuple
ó   /)re   ÚS_ISDIR)rE  r²   r/  rß   s       ra   r%   r%   ò  s-   € ð !Ñ€T‰<ˆDÜ‡|‚|�D×ÑØ�‰ˆØ€Kr`   c                 ó   • U S   $ )z&Sort key for tree entry in name order.r5   rY   )rE  s    ra   r&   r&   þ  s   € à�‰8€Or`   r/  r|   Úencodingc           	      ó¢   • U[         R                  -  (       a  SnOSnSR                  UUUR                  S5      U R                  US5      5      $ )zÛPretty format tree entry.

Args:
  name: Name of the directory entry
  mode: Mode of entry
  hexsha: Hexsha of the referenced object
  encoding: Character encoding for the name
Returns: string describing the tree entry
ÚtreerÊ  z{:04o} {} {}	{}
rŠ   r9  )re   ÚS_IFDIRr
  r�   )r²   r/  r|   rJ  Úkinds        ra   r/   r/     sM   € ð Œd�l‰l×Ø‰àˆØ×&Ñ&ØØØ�‰�gÓØ�‰�H˜iÓ(ó	ð r`   c                   ó.   • \ rS rSrSrS\S\SS4S jrSrg)	r   i  z3A submodule was encountered while resolving a path.rˆ   rt   rc   Nc                 ó   • Xl         X l        g)zƒInitialize SubmoduleEncountered exception.

Args:
    path: Path where the submodule was encountered
    sha: SHA of the submodule
N©rˆ   rt   )rá   rˆ   rt   s      ra   râ   ÚSubmoduleEncountered.__init__  s   € ð Œ	Ø�r`   rQ  )	rZ   r[   r\   r]   r^   r‚   r   râ   r_   rY   r`   ra   r   r     s   † Ù=ð˜Uð ¨ð °d÷ r`   r   c                   óÈ  ^ • \ rS rSrSrSrSrSrS%U 4S jjr\	 S&S\
S	.S
\\-  S\S-  S\S-  S\SS 4
S jjj5       rS\S\4S jrS\S\\\4   4S jrS\S\\\4   SS4S jrS\SS4S jrS\4S jrS\\   4S jrS\S\S\SS4S jrS'S\S\\   4S jjrS\\   4S jrS\\   SS4S jrS%U 4S jjr S\\   4S  jr!S\4S! jr"S"\#\/\$4   S
\S\\\4   4S# jr%S$r&U =r'$ )(r   i)  zA Git tree object.rT   r‹   Ú_entriesrc   Nc                 ó0   >• [         TU ]  5         0 U l        g)zInitialize an empty Tree.N)r¹  râ   rT  rº  s    €ra   râ   ÚTree.__init__1  s   ø€ ä‰ÑÔØ;=ˆ�r`   r^  rˆ   rt   r  rh   c                óv   • [         R                  XX4S9n[        XP5      (       d  [        [	        U5      5      eU$ )a  Read a tree from a file on disk.

Args:
  path: Path to the tree file
  sha: Optional known SHA for the object
  object_format: Optional object format to use
  max_size: Maximum inflated size in bytes

Returns:
  A Tree object

Raises:
  NotTreeError: If the file is not a tree
r^  )r   rm  r�   rL   rØ   )r±   rˆ   rt   r  rh   rL  s         ra   rm  ÚTree.from_path6  rÌ  r`   r²   c                 ó   • XR                   ;   $ )zCheck if name exists in tree.©rT  ©rá   r²   s     ra   Ú__contains__ÚTree.__contains__T  s   € à—}‘}Ñ$Ð$r`   c                 ó    • U R                   U   $ )zGet tree entry by name.rZ  r[  s     ra   Ú__getitem__ÚTree.__getitem__X  s   € à�}‰}˜TÑ"Ð"r`   r¶   c                 ó:   • Uu  p4X44U R                   U'   SU l        g)zåSet a tree entry by name.

Args:
  name: The name of the entry, as a string.
  value: A tuple of (mode, hexsha), where mode is the mode of the
    entry as an integral type and hexsha is the hex SHA of the entry as
    a string.
TN©rT  rº   )rá   r²   r¶   r/  r|   s        ra   Ú__setitem__ÚTree.__setitem__\  s#   € ð ‰ˆØ#˜nˆ�‰�dÑØ$(ˆÕ!r`   c                 ó,   • U R                   U	 SU l        g)zDelete tree entry by name.TNrb  r[  s     ra   Ú__delitem__ÚTree.__delitem__i  s   € à�M‰M˜$ÐØ$(ˆÕ!r`   c                 ó,   • [        U R                  5      $ )z!Return number of entries in tree.)rp   rT  rå   s    ra   Ú__len__ÚTree.__len__n  s   € ä�4—=‘=Ó!Ð!r`   c                 ó,   • [        U R                  5      $ )zIterate over tree entry names.)ÚiterrT  rå   s    ra   Ú__iter__ÚTree.__iter__r  s   € ä�D—M‘MÓ"Ð"r`   r/  r|   c                 ó2   • X#4U R                   U'   SU l        g)zúAdd an entry to the tree.

Args:
  mode: The mode of the entry as an integral type. Not all
    possible modes are supported by git; see check() for details.
  name: The name of the entry, as a string.
  hexsha: The hex SHA of the entry as a string.
TNrb  )rá   r²   r/  r|   s       ra   ÚaddÚTree.addv  s   € ð #˜lˆ�‰�dÑØ$(ˆÕ!r`   r@  c                 ó.   • [        U R                  U5      $ )z•Iterate over entries.

Args:
  name_order: If True, iterate in name order instead of tree
    order.
Returns: Iterator over (name, mode, sha) tuples
)r3   rT  )rá   r@  s     ra   Ú	iteritemsÚTree.iteritems‚  s   € ô ! §¡°
Ó;Ð;r`   c                 ó4   • [        U R                  5       5      $ )zUReturn the sorted entries in this tree.

Returns: List with (name, mode, sha) tuples
)r´  rs  rå   s    ra   rÛ   Ú
Tree.itemsŒ  s   € ô
 �D—N‘NÓ$Ó%Ð%r`   rA  c           
      óþ   •  [        SR                  U5      U R                  R                  S9nU VVVs0 s H  u  pEodU[        U5      4_M     snnnU l        g! [         a  n[        U5      UeSnAff = fs  snnnf )zGrab the entries in the tree.r`   )r5  N)r.   r�   r  Ú
oid_lengthr{   rM   r   rT  )rá   rA  Úparsed_entriesr„   Únrb   Úss          ra   rC  ÚTree._deserialize“  sy   € ð	6Ü'Ø—‘˜Ó Ø×*Ñ*×5Ñ5ñˆNñ =KÕKºN±°°q˜Q¤¨£Ð,Ò,¹NÓKˆ�øô ó 	6Ü'¨Ó,°#Ð5ûð	6üô
 Ls   ‚-A µA8Á
A5Á$A0Á0A5c           	      óÔ  >• [         TU ]  5         U R                  c   eSn[        R                  S-  [        R                  S-  [        R
                  [        R                  [        [        R                  S-  4n[        SR                  U R                  5      SU R                  R                  S9 H±  u  p4n[        USU< 35        S	U;   d  US
;   a*  [        SR                  UR                  SS5      5      5      eXB;  a  [        SUS 35      eX4[!        U5      44nU(       a:  [#        U5      [#        U5      :”  a  [        S5      eX1S   :X  a  [        SU< 35      eUnM³     g)rÎ  Nií  i¤  i´  r`   T)r4  r5  zinvalid sha rG  )r`   ó   .s   ..s   .gitzinvalid name {}rÖ   r9  zinvalid mode Ú06ozentries not sortedr5   zduplicate entry )r¹  rˆ  r   re   ÚS_IFREGÚS_IFLNKrM  r
   r.   r�   r  rx  r   rM   r
  r�   r   r%   )rá   r  Úallowed_modesr²   r/  rt   rE  rž  s          €ra   rˆ  Ú
Tree.check¡  sP  ø€ ô 	‰‰ŒØ×!Ñ!Ñ-Ð-Ð-Øˆä�L‰L˜5Ñ Ü�L‰L˜5Ñ Ü�L‰LÜ�L‰LÜä�L‰L˜5Ñ ð
ˆô  *Ø�H‰H�T×'Ñ'Ó(ØØ×&Ñ&×1Ñ1ô 
‰OˆD˜ô
 ˜ ¨S©GÐ4Ô5Ø�t‹|˜tÐ'BÓBÜ+Ø%×,Ñ,¨T¯[©[¸À)Ó-LÓMóð ð Ó(Ü+¨m¸DÀ¸:Ð,FÓGÐGà¤(¨3£-Ð0Ð1ˆEÞÜ˜T“?¤Y¨uÓ%5Ó5Ü/Ð0DÓEÐEØ ™7“?Ü/Ð2BÀ4Á(Ð0KÓLÐLØŠDò) 
r`   c                 óF   • [        [        U R                  5       5      5      $ rd  )r´  r1   rs  rå   s    ra   r*  ÚTree._serializeÉ  s   € Ü”N 4§>¡>Ó#3Ó4Ó5Ð5r`   c                 ó$  • / nU R                  5        Hj  nUR                  c  M  UR                  c  M!  UR                  c  M0  UR	                  [        UR                  UR                  UR                  5      5        Ml     SR                  U5      $ )zdReturn a human-readable string representation of this tree.

Returns:
  Pretty-printed tree entries
Ú )rs  rˆ   r/  rt   rÒ  r/   r�   )rá   r  rE  s      ra   r:  ÚTree.as_pretty_stringÌ  sj   € ð ˆØ—^‘^Ö%ˆEà—
‘
Ó&Ø—J‘JÓ*Ø—I‘IÓ)à—‘Ô4°U·Z±ZÀÇÁÈUÏYÉYÓWÖXñ &ð �w‰w�t‹}Ðr`   Ú
lookup_objc                 ó   • U(       d  [         R                  U R                  4$ UR                  S5      nU R                  nSn[	        U5       Hm  u  pgU(       d  M  Ub.  [        U5      (       a  [        SR                  USU 5      U5      eU" U5      n[        U[        5      (       d  [        U5      eX‡   u  pTMo     Uc  [        S5      eXT4$ )z«Look up an object in a Git tree.

Args:
  lookup_obj: Callback for retrieving object by SHA1
  path: Path to lookup
Returns: A tuple of (mode, SHA) of the resulting path.
rG  NzNo valid path found)re   rM  r5  r  Ú	enumerater   r   r�   r�   r   rL   r{   )	rá   r‰  rˆ   Úpartsrt   r/  ÚiÚprµ   s	            ra   Úlookup_pathÚTree.lookup_pathÜ  sÀ   € ö Ü—<‘< §¡Ð(Ð(à—
‘
˜4Ó ˆØ�g‰gˆØˆÜ˜eÖ$‰DˆAÞÙØÑ¤K°×$5Ñ$5Ü*¨4¯9©9°U¸2¸A°YÓ+?ÀÓEÐEÙ˜S“/ˆCÜ˜c¤4×(Ñ(Ü" 3Ó'Ð'Ø™‰IˆD‘#ñ %ð ‰<ÜÐ2Ó3Ð3ØˆyÐr`   rb  r±  rd  ©F)(rZ   r[   r\   r]   r^   r°   r  rë   râ   r¶  r   rŒ   r‚   r   rQ   r	  rm  r²  r\  r-  r_  rc  rf  ri  r8   rm  rp  r   rs  r´  rÛ   rC  rˆ  r*  r:  r6   r   r�  r_   rÚ  rÛ  s   @ra   r   r   )  sº  ø† Ùà€IØ€Hà€I÷>ð
 ð  $ðð
 .2Ø7òà�E‰kðð ˜‰_ðð
 $ dÑ*ðð ðð 
õó ðð:% ð %¨4ô %ð# ð #¨%°°X°Ñ*>ô #ð) ð )¨e°C¸°MÑ.Bð )Àtô )ð) ð )¨$ô )ð
"˜ô "ð#˜( 5™/ô #ð
)˜ð 
) Sð 
)°(ð 
)¸tô 
)ñ< Dð <°X¸iÑ5Hõ <ð&�t˜I‘ô &ðL 4¨¡;ð L°4ô L÷&ðP6˜D ™Kô 6ð #ô ð Ø" H :¨wÐ#6Ñ7ðØ?Dðà	ˆs�Hˆ}Ñ	÷ò r`   c                 ó<  • U S   S;  a#  [        SR                  " S0 [        5       D65      eU SS n[        U SS 5      nUS:X  a  U* nUS:¬  =(       a    US:H  nUS:  =(       a    S=(       d    Sn[	        U5      n[        US-  5      nUS-  nXES	-  US
-  -   -  U4$ )zïParse a timezone text fragment (e.g. '+0100').

Args:
  text: Text to parse.
Returns: Tuple with timezone as seconds difference to UTC
    and a boolean indicating whether this was a UTC timezone
    prefixed with a negative sign (-0000).
r5   ó   +-z(Timezone must start with + or - ({text})NrF   ó   -rÏ   éd   é  é<   rY   )r{   r
  Úvarsr	  Úabs©r  ÚsignÚoffsetÚunnecessary_negative_timezoneÚsignumÚhoursÚminutess          ra   r,   r,   û  sº   € ð ˆA�w�eÓÜÐC×JÒJÑTÌTËVÑTÓUÐUØ��ˆ8€DÜ��a�b�‹]€FØˆtƒ|Ø�ˆØ$*¨a¡K×$@°D¸D±LÐ!Ø˜‰z×!˜r×' a€FÜ�‹[€FÜ�˜‘Ó€EØ�s‰l€Gà˜$‘, ¨2¡Ñ-Ñ.Ø%ðð r`   c                 ó   • U S   S;  a  SU -   n U SS n[        U SS 5      nUS:X  a  U* nUS:¬  =(       a    US:H  nUS:  =(       a    S=(       d    Sn[        U5      n[        US-  5      nUS-  nXES	-  US
-  -   -  U4$ )až  Parse a timezone text fragment, accepting broken formats.

This function handles various broken timezone formats found in the wild:
- Missing sign prefix (e.g., '0000' instead of '+0000')
- Double negative (e.g., '--700')

Args:
  text: Text to parse.
Returns: Tuple with timezone as seconds difference to UTC
    and a boolean indicating whether this was a UTC timezone
    prefixed with a negative sign (-0000).
r5   r“  ó   +NrF   r”  rÏ   r•  r–  r—  )r	  r™  rš  s          ra   r-   r-     s©   € ð ˆA�w�eÓà�d‰{ˆð
 ��ˆ8€DÜ��a�b�‹]€FØˆtƒ|Ø�ˆØ$*¨a¡K×$@°D¸D±LÐ!Ø˜‰z×!˜r×' a€FÜ�‹[€FÜ�˜‘Ó€EØ�s‰l€Gà˜$‘, ¨2¡Ñ-Ñ.Ø%ðð r`   rœ  r�  c                 ó’   • U S-  S:w  a  [        S5      eU S:  d  U(       a  SnU * n OSnSX S-  U S-  S-  4-  R                  S5      $ )	zóFormat a timezone for Git serialization.

Args:
  offset: Timezone offset as seconds difference to UTC
  unnecessary_negative_timezone: Whether to use a minus sign for
    UTC or positive timezones (-0000 and --700 rather than +0000 / +0700).
r—  r5   z#Unable to handle non-minute offset.Ú-Ú+z
%c%02d%02dr–  rŠ   )r{   r�   )rœ  r�  r›  s      ra   r   r   ;  s_   € ð ��{�aÓÜÐ>Ó?Ð?Ø�ƒzÖ2ØˆØ�‰àˆØ˜D¨4¡-°&¸2±+ÀÑ1CÐDÑD×LÑLÈWÓUÐUr`   r¶   c                 ó  •  U R                  S5      n U SUS-    nXS-   S nUR                  SS5      u  pE[        U5      n[	        U5      u  pxX&Xx44$ ! [         a    U SS4s $ f = f! [         a  n	[        U	5      U	eSn	A	ff = f)z×Parse event.

Args:
  value: Bytes representing a git commit/tag line
Raises:
  ObjectFormatException in case of parsing error (malformed
  field date)
Returns: Tuple of (author, time, (timezone, timezone_neg_utc))
s   > N)NFr5   rF   r‹   r­   )Úrindexr{   r    r	  r,   rM   )
r¶   r¡   Úpersonr¥   ÚtimetextÚtimezonetextÚtimeÚtimezoneÚtimezone_neg_utcr„   s
             ra   r*   r*   M  s­   € ð,Ø�l‰l˜5Ó!ˆð2Ø�q˜3 ™7Ð#ˆØ˜1‘W�YÐˆØ!%§¡¨T°1Ó!5ÑˆÜ�8‹}ˆÜ%3°LÓ%AÑ"ˆð ˜(Ð5Ð5Ð5øô ó ,Ø�t˜]Ð+Ò+ð,ûô ó 2Ü# CÓ(¨cÐ1ûð2ús(   ‚A ”;A) ÁA&Á%A&Á)
BÁ3A?Á?Bc                 óø   • [         R                  U 5      nU(       d  [        SU < 35      eUR                  S5      nUR                  S5      nUR                  S5      n[	        U5      n[        U5      u  pgX%Xg44$ )a{  Parse event, accepting broken formats.

This function handles various broken author/committer/tagger line formats:
- Missing angle brackets around email
- Unsigned timezones
- Double-negative timezones

Args:
  value: Bytes representing a git commit/tag line
Raises:
  ObjectFormatException in case of parsing error
Returns: Tuple of (author, time, (timezone, timezone_neg_utc))
zUnable to parse time entry: r¨  r«  r¬  )Ú_TIME_ENTRY_RErð  rM   Úgroupr	  r-   )r¶   rb   r¨  r©  rª  r«  r¬  r­  s           ra   r+   r+   h  sw   € ô  	×Ñ˜UÓ#€AÞÜ#Ð&BÀ5Á)Ð$LÓMÐMà�W‰W�XÓ€FØ�w‰w�v‹€HØ—7‘7˜:Ó&€LÜˆx‹=€DÜ!6°|Ó!DÑ€Hà˜(Ð5Ð5Ð5r`   r¨  r«  Útimezone_infoc                 ót   • Uu  p4SR                  U [        U5      R                  S5      [        X45      /5      $ )zFormat an event.r­   rŠ   )r�   rŒ   r�   r   )r¨  r«  r±  r¬  r­  s        ra   r   r   …  s;   € ð $1Ñ €XØ�9‰9Ø	”�T“×!Ñ! 'Ó*¬O¸HÓ,WÐXóð r`   Úparse_identÚsignature_headerc           	      ó:  • / n/ nSnSnSnSn/ n	Sn
/ nSn[        U 5       GH–  u  pÞUc  U[        :w  a  [        S5      eU[        :w  a  USL =(       a	    U[        :H  nU[        :X  a#  Uc  Uc  [        S5      e[	        US5        UnMg  Mi  U[        :X  a6  Uc  [        S5      eU(       a  [	        US5        UR                  U5        M§  M©  U[        :X  a  Uc  [        S5      eUc  UnMÈ  MÊ  U[        :X  a  Uc  [        S	5      eUc  UnMé  Më  U[        :X  a	  Uc  UnMü  Mþ  U[        :X  a;  Uc  [        S
5      e [        R                  US-   5      nU	R                  U5        GMC  XÒ:X  a"  Uc  [        S5      eUR                  U5        GMj  Uc  Un
GMr  Uc  [        SU< 35      eUR                  XÞ45        GM™     SnUUUb  U" U5      OUUb  U" U5      OUUU	U(       a  SR                  U5      U
U4	$ SU
U4	$ ! [         a    UR                  XÞ45         GMù  f = f)aé  Parse a commit object from chunks.

Where a header is repeated, the first tree, author, committer and
encoding are used, and only the parents directly following the tree.
Repeated signature headers are concatenated.

Args:
  chunks: Chunks to parse
  parse_ident: Function to parse author and committer lines
  signature_header: Name of the signature header for the hash algorithm
Returns: Tuple of (tree, parents, author_info, commit_info,
    encoding, mergetag, gpgsig, message, extra)
NFz!commit does not start with a treezmissing tree valueúinvalid tree shazmissing parent valueúinvalid parent shazmissing author valuezmissing committer valuezmissing mergetag valuerÐ   zmissing signature valuezmissing value for field )NNrÜ  )rè  Ú_TREE_HEADERrM   Ú_PARENT_HEADERr   rÒ  Ú_AUTHOR_HEADERÚ_COMMITTER_HEADERÚ_ENCODING_HEADERÚ_MERGETAG_HEADERr   r~  r�   )rA  r³  r´  ÚparentsÚextrarL  ÚauthorÚ	committerrJ  Úmergetagr  Ú
signaturesÚ
in_parentsrì  r¶   r  Úno_idents                    ra   Ú_parse_commitrÆ  œ  su  € ð( €GØ')€EØ€DØ€FØ€IØ€HØ€HØ€GØ€Jð €JÜ& v×.‰ˆØ‰<˜E¤\Ó1Ü'Ð(KÓLÐLØ”NÓ"Ø ˜×?¨%´<Ñ*?ˆJØ”LÓ Ø‰|Ø‘=Ü/Ð0DÓEÐEÜ˜UÐ$6Ô7Ø’ñ	 ð
 ”nÓ$Ø‰}Ü+Ð,BÓCÐCÞÜ˜UÐ$8Ô9Ø—‘˜uÖ%ñ ð ”nÓ$Ø‰}Ü+Ð,BÓCÐCØ‰~Ø’ñ àÔ'Ó'Ø‰}Ü+Ð,EÓFÐFØÑ Ø!’	ñ !àÔ&Ó&ØÑØ ’ñ  àÔ&Ó&Ø‰}Ü+Ð,DÓEÐEð%Ü—o‘o e¨e¡mÓ4�ð —‘ ×$ØÓ&Ø‰}Ü+Ð,EÓFÐFØ×Ñ˜e×$Ø‰]Ø‹Gà‰}Ü+Ð.FÀuÁiÐ,PÓQÐQØ�L‰L˜%˜×(ña /ðbQ€Hð 	ØØ%Ñ1‰�FÔ°xØ"+Ñ"7‰�IÔ¸XØØÞ",ˆ�
‰
�:ÓØØð
ð 
ð 37ØØð
ð 
øô' )ó -Ø—‘˜e˜^×,Ð,ð-ús   Ä7G9Ç9HÈHr  c                 ó.   • U [         :X  a  [        $ [        $ rd  )rP   Ú_GPGSIG_SHA256_HEADERÚ_GPGSIG_HEADERrx  s    ra   Ú_signature_headerrÊ     s   € ØœÓÜ$Ð$ÜÐr`   rR  c                 ó²  • / nSnSnU[        U 5      :  a²  U R                  SU5      S-   nUS:X  a  [        U 5      nU(       a  U R                  SU5      (       a  OZU R                  SU5      (       a  SnO@U R                  SU5      (       a  UR                  XS 5        O(SnUR                  XU 5        UnU[        U 5      :  a  M²  S	R	                  U5      $ )
z¯Return the commit payload covered by a signature.

This drops every header starting with "gpgsig" (both ``gpgsig`` and
``gpgsig-sha256``) along with their continuation lines.
Fr5   rÐ   rF   r­   rU   TNr`   )rp   rÑ   râ  rÒ  r�   )rR  r)  Ú	in_headerr  r  s        ra   Ú_strip_signature_headersrÍ    sÍ   € ð €GØ€IØ€EØ
”#�c“(Ó
Ø�h‰h�u˜eÓ$ qÑ(ˆØ�!‹8Ü�c“(ˆCÞ˜Ÿ™¨¨e×4Ñ4ØØ�^‰^˜I u×-Ñ-Ø‰IØ�^‰^˜E 5×)Ñ)Ø�N‰N˜3˜v˜;Ô'ØàˆIØ�N‰N˜3 S˜>Ô*Øˆð ”#�c“(Õ
ð �8‰8�GÓÐr`   c                 ó$   • [        U [        U5      $ )a®  Parse a commit object from chunks, accepting broken formats.

This function handles various broken author/committer line formats:
- Missing angle brackets around email
- Unsigned timezones
- Double-negative timezones

Args:
  chunks: Chunks to parse
  signature_header: Name of the signature header for the hash algorithm
Returns: Tuple of (tree, parents, author_info, commit_info,
    encoding, mergetag, gpgsig, message, extra)
)rÆ  r+   )rA  r´  s     ra   Ú_parse_commit_brokenrÏ  !  s   € ô" ˜Ô!8Ð:JÓKÐKr`   c                   ó  ^ • \ rS rSrSrSrSrSrS/U 4S jjr\	 S0S\
S	.S
\\-  S\S-  S\S-  S\SS 4
S jjj5       rS\\   SS4S jrS/U 4S jjrS\4S jrS\\\S-  \S-  4   4S jrS\\   4S jr\" SS5      r\S\\   4S j5       r\R8                  S\\   SS4S j5       r\" SS5      r\" SS5      r\" SS5      r\" S S!5      r \" S"S#5      r!\" S$S%5      r"\" S&S'5      r#\" S(S)5      r$\" S*S+5      r%\" S,S-5      r&S.r'U =r($ )1r   i5  zA git commit object.rî   rF   )Ú_authorÚ_author_timeÚ_author_timezoneÚ_author_timezone_neg_utcÚ_commit_timeÚ_commit_timezoneÚ_commit_timezone_neg_utcÚ
_committerÚ	_encodingrõ  Ú_gpgsigÚ	_mergetagrö  Ú_parentsÚ_treerc   Nc                 ó„   >• [         TU ]  5         / U l        SU l        / U l        SU l        / U l        SU l        SU l        g)zInitialize an empty Commit.NF)	r¹  râ   rÜ  rÙ  rÛ  rÚ  rõ  rÔ  r×  rº  s    €ra   râ   ÚCommit.__init__M  sA   ø€ ä‰ÑÔØ(*ˆŒØ'+ˆŒØ$&ˆŒØ%)ˆŒØ13ˆŒØ5:ˆÔ%Ø5:ˆÕ%r`   r^  rˆ   rt   r  rh   c                óv   • [         R                  XX4S9n[        XP5      (       d  [        [	        U5      5      eU$ )a   Read a commit from a file on disk.

Args:
  path: Path to the commit file
  sha: Optional known SHA for the object
  object_format: Optional object format to use
  max_size: Maximum inflated size in bytes

Returns:
  A Commit object

Raises:
  NotCommitError: If the file is not a commit
r^  )r   rm  r�   rJ   rØ   )r±   rˆ   rt   r  rh   Úcommits         ra   rm  ÚCommit.from_pathX  s@   € ô. ×"Ñ"Ø ]ð #ð 
ˆô ˜&×&Ñ&Ü ¤°Ó!5Ó6Ð6Øˆr`   rA  c           	      óZ  • [        U[        U R                  5      S9u	  nnnnnnnn	n
X l        U Vs/ s H  n[	        U5      PM     snU l        X`l        Xpl        X€l        X�l	        X l
        Uu  U l        U l        u  U l        U l        Uu  U l        U l        u  U l        U l        g s  snf )N)r´  )rÆ  rÊ  r  rÝ  r   rÜ  rÙ  rÛ  rÚ  rö  rõ  rÑ  rÒ  rÓ  rÔ  rØ  rÕ  rÖ  r×  )rá   rA  rL  r¾  Úauthor_infoÚcommit_inforJ  rÂ  Úgpgsigr  r¿  rŽ  s               ra   rC  ÚCommit._deserializev  sÀ   € ô ØÔ%6°t×7IÑ7IÓ%Jñ
ñ
	
ØØØØØØØØØð
 Œ
Ù.5Ó6ªg¨œ !ž©gÑ6ˆŒØ!ŒØ!ŒØŒØŒØŒð ñ		
ØŒLØÔÙBˆTÔ" DÔ$Að ñ		
ØŒOØÔÙBˆTÔ" DÕ$Aùò 7s   ²B(c                 ó$  >• [         TU ]  5         U R                  c   eU R                  SS5        U R                  SS5        U R                  SS5        U R                  SS	5        U R                  S
S5        U R                   H  n[        US5        M     U R                  c   e[        U R                  S5        U R                  c   eU R                  c   e[        U R                  S5        [        U R                  S5        U R                  c   eU R                  c   e[        U R                  5        [        U R                  5        Sn[        U R                  5       H§  u  p4U[        :X  a  Ub  [        S5      eU[         :X  a  U[         [        4;  a  [        S5      eU["        :X  a  U[        [         4;  a  [        S5      eU[$        :X  a  U["        :w  a  [        S5      eU[&        :X  a  U[$        :w  a  [        S5      eUnM©     g)rÎ  NrÝ  zmissing treerÑ  zmissing authorrØ  zmissing committerrÒ  zmissing author timerÕ  zmissing commit timer·  r¶  zinvalid authorzinvalid committerzunexpected treezunexpected parentzunexpected authorzunexpected committerzunexpected encoding)r¹  rˆ  r   r‚  rÜ  r   rÝ  rÑ  rØ  r   rÒ  rÕ  r   rè  r¸  rM   r¹  rº  r»  r¼  )rá   Úparentr  rì  r¸   rž  s        €ra   rˆ  ÚCommit.check˜  sí  ø€ ô 	‰‰ŒØ×!Ñ!Ñ-Ð-Ð-Ø×Ñ˜w¨Ô7Ø×Ñ˜yÐ*:Ô;Ø×Ñ˜|Ð-@ÔAØ×Ñ˜~Ð/DÔEØ×Ñ˜~Ð/DÔEà—m”mˆFÜ˜Ð!5Ö6ñ $à�z‰zÑ%Ð%Ð%Ü�T—Z‘ZÐ!3Ô4à�|‰|Ñ'Ð'Ð'Ø�‰Ñ*Ð*Ð*Ü�t—|‘|Ð%5Ô6Ü�t—‘Ð(;Ô<à× Ñ Ñ,Ð,Ð,Ø× Ñ Ñ,Ð,Ð,Ü�4×$Ñ$Ô%Ü�4×$Ñ$Ô%àˆÜ& t×'9Ñ'9Ö:‰HˆEØœÓ$¨Ñ)9Ü+Ð,=Ó>Ð>Øœ.Ó(¨TÜÜð:ó .ô ,Ð,?Ó@Ð@Øœ.Ó(¨TÜÜð:ó .ô ,Ð,?Ó@Ð@ØÔ+Ó+°¼Ó0FÜ+Ð,BÓCÐCØÔ*Ó*¨tÔ7HÓ/HÜ+Ð,AÓBÐBØŠDò# ;r`   c                 ó4   • [        U R                  5       5      $ )z‹Return raw string serialization without the GPG/SSH signature.

self.gpgsig is a signature for the returned raw byte string serialization.
)rÍ  r-  rå   s    ra   r#  ÚCommit.raw_without_sigË  s   € ô
 (¨×(:Ñ(:Ó(<Ó=Ð=r`   c                 ó@  • U R                   c  U R                  5       SS4$ U R                  5       nU R                   R                  [        5      (       a  [
        nO6U R                   R                  [        5      (       a  [        nO[        S5      eXR                   U4$ )a­  Extract the payload, signature, and signature type from this commit.

Returns:
  tuple of (``payload``, ``signature``, ``signature_type``) where:

  - ``payload``: The raw commit data without the signature
  - ``signature``: The signature bytes if present, None otherwise
  - ``signature_type``: SIGNATURE_PGP for PGP, SIGNATURE_SSH for SSH, None if no signature

Raises:
  ObjectFormatException: If signature has unknown format
Nr&  )	rÚ  r-  r#  râ  r'  r   r   r	   rM   r(  s      ra   r+  ÚCommit.extract_signatureÒ  s…   € ð �<‰<ÑØ×%Ñ%Ó'¨¨tÐ3Ð3à×&Ñ&Ó(ˆð �<‰<×"Ñ"Ô#9×:Ñ:Ü$‰HØ�\‰\×$Ñ$Ô%8×9Ñ9Ü$‰Hä'Ð(BÓCÐCàŸ™ hÐ.Ð.r`   c           	      ó$  • / nU R                   c   e[        U R                   [        5      (       a  U R                   R                  OU R                   nUR	                  [
        U45        U R                   H  nUR	                  [        U45        M     U R                  c   eU R                  c   eU R                  c   eU R                  c   eUR	                  [        [        U R                  U R                  U R                  U R                  45      45        U R                  c   eU R                  c   eU R                   c   eU R"                  c   eUR	                  [$        [        U R                  U R                  U R                   U R"                  45      45        U R&                  (       a!  UR	                  [(        U R&                  45        U R*                   H+  nUR	                  [,        UR/                  5       S S 45        M-     UR1                  S U R2                   5       5        U R4                  (       a0  UR	                  [7        U R8                  5      U R4                  45        [;        [=        XR>                  5      5      $ )NrÏ   c              3   ó6   #   • U  H  u  pUc  M
  X4v •  M     g 7frd  rY   )Ú.0rì  r¶   s      ra   Ú	<genexpr>Ú$Commit._serialize.<locals>.<genexpr>	  s   é € ð 
Ú/:™|˜u¸e‹NˆU�Nª{ùs   ‚	�
) rÝ  r�   r   r5  rÒ  r¸  rÜ  r¹  rÑ  rÒ  rÓ  rÔ  rº  r   rØ  rÕ  rÖ  r×  r»  rJ  r¼  rÂ  r½  r-  rÓ  rõ  ræ  rÊ  r  r´  rí  rö  )rá   ré  Ú
tree_bytesrŽ  rÂ  s        ra   r*  ÚCommit._serializeî  s"  € ØˆØ�z‰zÑ%Ð%Ð%Ü&0°·±¼T×&BÑ&B�T—Z‘Z—]’]ÈÏ
É
ˆ
Ø�‰œ jÐ1Ô2Ø—”ˆAØ�N‰NœN¨AÐ.Ö/ñ à�|‰|Ñ'Ð'Ð'Ø× Ñ Ñ,Ð,Ð,Ø×$Ñ$Ñ0Ð0Ð0Ø×,Ñ,Ñ8Ð8Ð8Ø�‰äÜ!Ø—L‘LØ×%Ñ%Ø×*Ñ*¨D×,IÑ,IÐJóðô		
ð �‰Ñ*Ð*Ð*Ø× Ñ Ñ,Ð,Ð,Ø×$Ñ$Ñ0Ð0Ð0Ø×,Ñ,Ñ8Ð8Ð8Ø�‰ä!Ü!Ø—O‘OØ×%Ñ%Ø×*Ñ*¨D×,IÑ,IÐJóðô		
ð �=�=Ø�N‰NÔ,¨d¯m©mÐ<Ô=ØŸœˆHØ�N‰NÔ,¨h×.DÑ.DÓ.FÀsÈÐ.KÐLÖMñ &à�‰ñ 
Ø/3¯{ª{ó
ô 	
ð �;�;Ø�N‰NÔ-¨d×.@Ñ.@ÓAÀ4Ç;Á;ÐOÔPÜ”O G¯]©]Ó;Ó<Ð<r`   rL  z%Tree that is the state of this commitc                 ó   • U R                   $ )z&Parents of this commit, by their SHA1.)rÜ  rå   s    ra   r¾  ÚCommit.parents	  s   € ð �}‰}Ðr`   r¶   c                 ó   • SU l         Xl        g)z%Set a list of parents of this commit.TN)rº   rÜ  r  s     ra   r¾  r÷  #	  s   € ð %)ˆÔ!Ø�r`   rÀ  z$The name of the author of the commitrÁ  z'The name of the committer of the commitr  zThe commit messageÚcommit_timezFThe timestamp of the commit. As the number of seconds since the epoch.Úcommit_timezonezThe zone the commit time is inÚauthor_timezOThe timestamp the commit was written. As the number of seconds since the epoch.Úauthor_timezonez'Returns the zone the author time is in.rJ  zEncoding of the commit message.rÂ  zAssociated signed tag.ræ  zGPG Signature.)rÑ  rÒ  rÓ  rÔ  rÕ  rÖ  r×  rØ  rÙ  rõ  rÚ  rÛ  rö  rº   rÜ  rÝ  r±  rd  ))rZ   r[   r\   r]   r^   r°   r  rë   râ   r¶  r   rŒ   r‚   r   rQ   r	  rm  r´  rC  rˆ  r#  r-  r+  r*  r0   rL  rÃ   r¾  rÙ  rÀ  rÁ  r  rù  rú  rû  rü  rJ  rÂ  ræ  r_   rÚ  rÛ  s   @ra   r   r   5  sÏ  ø† Ùà€IØ€Hð€I÷$	;ð ð  $ðð
 .2Ø7òà�E‰kðð ˜‰_ðð
 $ dÑ*ðð ðð 
õó ðð:  4¨¡;ð  °4ô  ÷D/ðf> ô >ð/ 5¨°¸±¸eÀd¹lÐ)JÑ#Kô /ð8,=˜D ™Kô ,=ñ\ ! Ð)PÓQ€Dàð˜˜h™ó ó ðð ‡^�^ð˜T (™^ð °ó ó ðñ
 # 8Ð-SÓT€Fá%ØÐ>ó€Iñ $ IÐ/CÓD€Gá'ØØPó€Kñ
 ,ØÐ;ó€Oñ (Øð	#ó€Kñ ,ØÐDó€Oñ % ZÐ1RÓS€Há$ ZÐ1IÓJ€Há" 8Ð-=Ó>†Fr`   rÆ   r½  c           	      óN  • [        5       n[        U /5      u	  nnnnnnnn	n
X!l        U Vs/ s H  n[        U5      PM     snUl        Xal        Xql        X�l        X‘l        X¡l	        Uu  Ul
        Ul        u  Ul        Ul        Uu  Ul        Ul        u  Ul        Ul        U$ s  snf )a½  Parse a commit with broken author/committer lines.

This function handles various broken formats found in the wild:
- Missing angle brackets around email addresses
- Unsigned timezones (e.g., "0000" instead of "+0000")
- Double-negative timezones (e.g., "--700")
- Negative timestamps
- Long/short/nonsensical timezone values

Warning: Commits parsed with this function may not round-trip correctly
through serialization, as the broken formatting is normalized during parsing.
The .check() method will likely fail for commits with malformed identity fields.

Args:
  data: Raw commit data as bytes

Returns:
  A Commit object with normalized fields

Example:
    >>> data = b'''tree d80c186a03f423a81b39df39dc87fd269736ca86
    ... author user@example.com 1234567890 -0500
    ... committer user@example.com 1234567890 -0500
    ...
    ... Commit message
    ... '''
    >>> commit = parse_commit_broken(data)
    >>> commit.author
    b'user@example.com'
)r   rÏ  rÝ  r   rÜ  rÙ  rÛ  rÚ  rö  rõ  rÑ  rÒ  rÓ  rÔ  rØ  rÕ  rÖ  r×  )r½  rá  rL  r¾  rä  rå  rJ  rÂ  ræ  r  r¿  rŽ  s               ra   r)   r)   \	  sÄ   € ô> ‹X€Fô 	˜d˜VÓ$ñ
ØØØØØØØØØð „LÙ,3Ó4ªG q”x –{©GÑ4€F„OØÔØÔØ„NØ„OØ„Mð 	ñ	ØŒØÔÙBˆÔ	  &Ô"Að 	ñ	ØÔØÔÙBˆÔ	  &Ô"Að €Mùò% 5s   «B")r.   )r3   rd  )rÖ   r‘  )’r^   Ú__all__ry   rŽ   r1  Úrere   Úsysrj   Úcollections.abcr6   r7   r8   r9   Úior:   r;   Útypingr<   r=   r>   r?   Úhashlibr@   Úsha1dcÚImportErrorÚversion_inforC   Útyping_extensionsrD   rE   ÚerrorsrG   rH   rI   rJ   rK   rL   rM   ÚfilerN   r  rO   rP   rQ   Ú_hashlibrR   rS   r¸  r¹  rº  r»  r¼  r½  rÉ  rÈ  r  r	  r
  r  r
   Úcompiler¯  r   r   r   r   r'  rï  r   r	   r‚   r   r   r   r³  r   r	  r²  r   r   rs   r2   rŒ   r    r4   r‡   r   r   r(   rÃ   r0   rÄ   r'   r   r   rØ   r   r   r   r"   r$   r!   r#   r   r   r-  rè  rí  ró  r   r   r.   r1   Údictr3   r%   r&   r/   r…  r   r   r,   r-   r   r*   r+   r   r´  Ú_CommitParseResultrÆ  rÊ  rÍ  rÏ  r   r   rÆ   r±   r°   r  r)   Ú_parse_tree_pyÚ_sorted_tree_items_pyÚdulwich._objectsÚ_parse_tree_rsÚ_sorted_tree_items_rsrY   r`   ra   Ú<module>r     sÛ  ðò. "ò4€ól Û 	Û Û 	Û Û 
Û ß BÓ Bß &÷ó ö Þð!Ýð ×Ñ�wÓÞå&ç %÷÷ ñ õ ß FÑ FæÝåð €Ø€Ø€Ø Ð ØÐ ØÐ Ø€Ø(Ð ð €Ø€Ø€Ø€ð €ð —’ØHó€ð
 €à6Ð Ø6Ð Ø8Ð Ø-Ð/MÐNÐ ðØðàðð ñÐ ð €Ø€ñ �:˜uÓ%€ñ �m UÓ+€ñ ˜iÓ(€ˆ(Ó (ô6Ð,ô 6ð)�3ð )˜4ô )ð #4Ð ð $CñØðØ ðà
õð(�Kð  Hô ð
/�H˜s‘Nð 
/ {ô 
/ð�e˜c‘kð  dô ñ& 	�˜˜eÓ$€ð˜%ð  h°¡nð ¸ô ð8%˜c E™kð %¨cô %ð>F˜Cð F¨ð F°ô Fñ- ð -°°d±
ð -Àhõ -ð6%�u˜s‘{ð % t¨I¡¸Ñ'=ô %ð
<�c˜E‘kð 
<¨cð 
<°dô 
<ð/˜U T™\ð /°cð /¸dô /ð4˜˜u™ð ¨ô ðP˜Sð P Tô Pð$�Uð $˜uô $÷
,ñ ,ö8 ð*�yð * Y¨xÑ%8ô *ð(�Yð ( 9¨VÑ#4ô (ð(�Yð ( 9¨VÑ#4ô (ð'�Ið ' )¨EÑ"2õ 'ð
*�yð * Tô *ð(�Yð ( 4ô (ð(�Yð ( 4ô (ð'�Ið ' $ô '÷
L#ñ L#ô^hˆ7ô hðV9Ø�U‰Oð9àˆe�JÑ %¨°©°eÐ(;Ñ"<Ñ<Ñ=ô9ðx
Ø�e˜E 5˜LÑ)Ñ*ð
Ø27¸$±,ð
àˆe�_ô
ð˜%ð  C¨$¡Jô ôI2ˆ'ô I2ôXO�
ô Oð (,ð+#Ø?Dò+#Ø
ð+#Ø ™*ð+#Ø8<ð+#àˆe�E˜3 Ð%Ñ&Ñ'ö+#ð\

˜( 5¨°°XÐ)=Ñ#>Ñ?ð 

ÀHÈUÁOô 

ð,Ø�%˜˜s H˜}Ñ-Ð-Ñ.ð,Ø<@ð,àˆiÑô,ð2	�U˜5 %¨¨X¨Ñ"6Ð6Ñ7ð 	¸Eô 	ð  e¨U°3¸°=Ñ-AÐ&AÑ Bð Àuô ð ?FñØ
ðØðØ$,ðØ8;ðàõô0˜9ô ôOˆ7ô Oðd˜ð  5¨¨d¨Ñ#3ô ð:  ð  ¨%°°T°	Ñ*:ô  ñFV˜Cð VÀð VÐQVõ Vð$6Øð6à
ˆ5�#˜‘*˜e C¨$¡J°Ð$4Ñ5Ð5Ñ6ô6ð66Øð6à
ˆ5�#˜‘*˜e C¨$¡J°Ð$4Ñ5Ð5Ñ6ô6ð:ØðØðØ-2°3¸°9Ñ-=ðà
ôð Ø	ˆD�LØˆ�KØ	ˆ%�$‰,˜˜d™
 E¨#°©*°d¸T±kÐ*AÑ$BÐ
BÑCØ	ˆ%�$‰,˜˜d™
 E¨#°©*°d¸T±kÐ*AÑ$BÐ
BÑCØ	ˆD�LØˆ�IØ	ˆD�LØ	ˆD�LØˆˆu�eˆ|Ñ	Ñðñ
Ð ð" 	Ø,ñaØ�U‰OðaàØ	ˆ��u˜c D™j¨%°°d±
¸DÐ0@Ñ*AÐAÑBÐBñðað
 ðað õaðH \ð °eô ð %ð ¨Eô ð: -ñLØ�U‰OðLàðLð õLô(S?ˆWô S?ðn ØØØð	€ð /1€	ˆ4�˜‘˜T '™]Ð*Ñ+Ó 0ã€CØ"€Iˆc�mŠmÑØ!€Iˆc�lŠlÓñ ð?˜eð ?¨ô ?ðF €Ø)Ð ð.õõð  €JØ-ÑøðSJ ó !ß Ð ð!ûðJJ ó 	Ùð	ús$   ÁS ÓS& ÓS#Ó"S#Ó&S/Ó.S/