§
    ÎÑßj‚  ã                   óÈ  — d gZ ddlmZ ddlZddlmZ ddlZddlZddlZddl	m
Z
mZ ddlZddlmZmZmZmZmZ ddlZddlmZ ddlmZ dd	lmZ dd
lmZmZmZmZ ddlmZ ddl m!Z! ddl"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z( ddl)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3 ej4        dk    rddl)m5Z5 nddl6m5Z5 ddl7m8Z8 e1rddl9m:Z: ddl;m<Z<  ej=        e>¦  «        Z? G d„ d ej@        e$ee#¦  «        ZAdS )ÚCommité    )ÚdefaultdictN)ÚBytesIO)ÚPopenÚPIPE)ÚaltzoneÚdaylightÚ	localtimeÚtimeÚtimezone)ÚIStream)ÚGit)ÚDiffable)ÚActorÚStatsÚfinalize_processÚ
hex_to_biné   )Úbase)ÚTree)ÚSerializableÚTraversableIterableObjÚaltz_to_utctz_strÚfrom_timestampÚparse_actor_and_dateÚ
parse_date)
ÚAnyÚDictÚIOÚIteratorÚListÚSequenceÚTupleÚTYPE_CHECKINGÚUnionÚcast)é   é   )ÚLiteral)ÚPathLike)ÚSymbolicReference)ÚRepoc                   ó  ‡ — e Zd ZU dZdZdZdZdZddgZdZ	e
d         ed	<   d
ZdZed          ed<   	 	 	 	 	 	 	 	 	 	 	 dCdddedeedf         deedf         deedf         dedef         deedf         deedf         dedef         deeedf         deed          df         deedf         deedf         ddfˆ fd„Zedd ded         fd„¦   «         Zedddd defd„¦   «         Zd edd fd!„Zd"eddfˆ fd#„Zedej        fd$„¦   «         Z edej        fd%„¦   «         Z!edeeef         fd&„¦   «         Z"	 	 dDd)ee#ee#         f         d*e$d edefd+„Z%edefd,„¦   «         Z&e	 	 dDddd-eed d.f         d)ee#ee#         f         d*e$d ede'd          fd/„¦   «         Z(dEd)ee#ee#         f         d ede'd          fd0„Z)ede*fd1„¦   «         Z+ede,eef         fd2„¦   «         Z-ede.eeef                  fd3„¦   «         Z/eefdddeeef         d4ee         dedef
d5„¦   «         Z0ede,ee.e         f         fd6„¦   «         Z1eddd7ee2e3f         de'd          fd8„¦   «         Z4e	 	 	 	 	 	 	 dFdddeeef         ded9ede.d          f         d:e$dedef         dedef         d;edeej        f         d<edeej        f         d=ede,eef         e.eeef                  f         dd fd>„¦   «         Z5d?e6dd fd@„Z7d?e6dd fdA„Z8ede.e         fdB„¦   «         Z9ˆ xZ:S )Gr   a1  Wraps a git commit object.

    See :manpage:`gitglossary(7)` on "commit object":
    https://git-scm.com/docs/gitglossary#def_commit_object

    :note:
        This class will act lazily on some of its attributes and will query the value on
        demand only if it involves calling the git binary.
    ÚGIT_AUTHOR_DATEÚGIT_COMMITTER_DATEzi18n.commitencodingzUTF-8z--outputz-oÚcommitÚtype)ÚtreeÚauthorÚauthored_dateÚauthor_tz_offsetÚ	committerÚcommitted_dateÚcommitter_tz_offsetÚmessageÚparentsÚencodingÚgpgsigÚhexshar:   NÚrepor,   Úbinshar2   r3   r4   r5   r6   r7   r8   r9   r;   r<   Úreturnc                 ó†  •— t          ¦   «                              ||¦  «         || _        |�/t          |t          ¦  «        sJ dt          |¦  «        z  ¦   «         ‚|�|| _        |�|| _        |�|| _        |�|| _	        |�|| _
        |�|| _        |	�|	| _        |
�|
| _        |�|| _        |�|| _        |�	|| _        dS dS )a  Instantiate a new :class:`Commit`. All keyword arguments taking ``None`` as
        default will be implicitly set on first query.

        :param binsha:
            20 byte sha1.

        :param tree:
            A :class:`~git.objects.tree.Tree` object.

        :param author:
            The author :class:`~git.util.Actor` object.

        :param authored_date: int_seconds_since_epoch
            The authored DateTime - use :func:`time.gmtime` to convert it into a
            different format.

        :param author_tz_offset: int_seconds_west_of_utc
            The timezone that the `authored_date` is in.

        :param committer:
            The committer string, as an :class:`~git.util.Actor` object.

        :param committed_date: int_seconds_since_epoch
            The committed DateTime - use :func:`time.gmtime` to convert it into a
            different format.

        :param committer_tz_offset: int_seconds_west_of_utc
            The timezone that the `committed_date` is in.

        :param message: string
            The commit message.

        :param encoding: string
            Encoding of the message, defaults to UTF-8.

        :param parents:
            List or tuple of :class:`Commit` objects which are our parent(s) in the
            commit dependency graph.

        :return:
            :class:`Commit`

        :note:
            Timezone information is in the same format and in the same sign as what
            :func:`time.altzone` returns. The sign is inverted compared to git's UTC
            timezone.
        Nz(Tree needs to be a Tree instance, was %s)ÚsuperÚ__init__r?   Ú
isinstancer   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   )Úselfr>   r?   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   Ú	__class__s                 €úF/opt/saltstack/salt/lib/python3.11/site-packages/git/objects/commit.pyrC   zCommit.__init__s   sú   ø€ õ~ 	‰Œ×Ò˜˜vÑ&Ô&Ð&ØˆŒØÐÝ˜d¥DÑ)Ô)ÐbÐbÐ+UÕX\Ð]aÑXbÔXbÑ+bÑbÔbÐ)ØÐØˆDŒIØÐØ ˆDŒKØÐ$Ø!.ˆDÔØÐ'Ø$4ˆDÔ!ØÐ Ø&ˆDŒNØÐ%Ø"0ˆDÔØÐ*Ø':ˆDÔ$ØÐØ"ˆDŒLØÐØ"ˆDŒLØÐØ$ˆDŒMØÐØ ˆDŒKˆKˆKð Ðó    )r   .c                 ó*   — t          |j        ¦  «        S ©N)Útupler:   )Úclsr0   s     rG   Ú_get_intermediate_itemszCommit._get_intermediate_itemsÍ   s   € å�V”^Ñ$Ô$Ð$rH   c                 ó  — t          ¦   «         }|                     |¦  «         |                     ¦   «         }|                     d¦  «         |j                             t          | j        ||¦  «        ¦  «        }|j        S )zåCalculate the sha of a commit.

        :param repo:
            :class:`~git.repo.base.Repo` object the commit should be part of.

        :param commit:
            :class:`Commit` object for which to generate the sha.
        r   )	r   Ú
_serializeÚtellÚseekÚodbÚstorer   r1   r?   )rL   r>   r0   ÚstreamÚ	streamlenÚistreams         rG   Ú_calculate_sha_zCommit._calculate_sha_Ñ   sf   € õ ‘”ˆØ×Ò˜&Ñ!Ô!Ð!Ø—K’K‘M”Mˆ	Ø�Š�A‰Œˆà”(—.’.¥¨¬°9¸fÑ!EÔ!EÑFÔFˆØŒ~ÐrH   Úkwargsc                 ó  ‡ — ˆ fd„‰ j         D ¦   «         }|D ]}|‰ j         vrt          d¦  «        ‚Œ|                     |¦  «          ‰ j        ‰ j        ‰ j        fi |¤Ž}‰                      ‰ j        |¦  «        |_        |S )z·Create new commit object from an existing commit object.

        Any values provided as keyword arguments will replace the corresponding
        attribute in the new object.
        c                 ó2   •— i | ]}|t          ‰|¦  «        “ŒS © )Úgetattr)Ú.0ÚkrE   s     €rG   ú
<dictcomp>z"Commit.replace.<locals>.<dictcomp>ë   s%   ø€ Ð=Ð=Ð=¨�•G˜D !Ñ$Ô$Ð=Ð=Ð=rH   zinvalid attribute name)Ú	__slots__Ú
ValueErrorÚupdaterF   r>   ÚNULL_BIN_SHArW   r?   )rE   rX   ÚattrsÚattrnameÚ
new_commits   `    rG   ÚreplacezCommit.replaceä   s¤   ø€ ð >Ð=Ð=Ð=¨d¬nÐ=Ñ=Ô=ˆàð 	;ð 	;ˆHØ˜tœ~Ð-Ð-Ý Ð!9Ñ:Ô:Ð:ð .ð 	�Š�VÑÔÐØ#�T”^ D¤I¨tÔ/@ÐJÐJÀEÐJÐJˆ
Ø ×0Ò0°´¸JÑGÔGˆ
ÔàÐrH   Úattrc                 ó.  •— |t           j        v rd| j        j                             | j        ¦  «        \  }}| _        }|                      t          | 	                    ¦   «         ¦  «        ¦  «         d S t          ¦   «                              |¦  «         d S rJ   )r   r`   r>   rR   rT   r?   ÚsizeÚ_deserializer   ÚreadrB   Ú_set_cache_)rE   rh   Ú_binshaÚ	_typenamerT   rF   s        €rG   rm   zCommit._set_cache_÷   s}   ø€ Ø•6Ô#Ð#Ð#à48´I´M×4HÒ4HÈÌÑ4UÔ4UÑ1ˆG�Y ¤	¨6Ø×Ò�g f§k¢k¡m¤mÑ4Ô4Ñ5Ô5Ð5Ð5Ð5å‰GŒG×Ò Ñ%Ô%Ð%Ð%Ð%rH   c                 ó6   — t          | j        | j        ¦  «        S rJ   )r   r4   r5   ©rE   s    rG   Úauthored_datetimezCommit.authored_datetime   s   € å˜dÔ0°$Ô2GÑHÔHÐHrH   c                 ó6   — t          | j        | j        ¦  «        S rJ   )r   r7   r8   rq   s    rG   Úcommitted_datetimezCommit.committed_datetime  s   € å˜dÔ1°4Ô3KÑLÔLÐLrH   c                 óº   — t          | j        t          ¦  «        r!| j                             dd¦  «        d         S | j                             dd¦  «        d         S )z):return: First line of the commit messageú
r   r   ó   
)rD   r9   ÚstrÚsplitrq   s    rG   ÚsummaryzCommit.summary  sR   € õ �d”l¥CÑ(Ô(ð 	3Ø”<×%Ò% d¨AÑ.Ô.¨qÔ1Ð1à”<×%Ò% e¨QÑ/Ô/°Ô2Ð2rH   Ú FÚpathsÚallow_unsafe_optionsc                 óZ  — |s.t          j        t          j        g |¦  «        | j        ¬¦  «         |r>t	           | j        j        j        | j        d|fi |¤Ž 	                    ¦   «         ¦  «        S t	           | j        j        j        | j        fi |¤Ž 	                    ¦   «         ¦  «        S )a\  Count the number of commits reachable from this commit.

        :param paths:
            An optional path or a list of paths restricting the return value to commits
            actually containing the paths.

        :param allow_unsafe_options:
            Allow unsafe options, like ``--output``.

        :param kwargs:
            Additional options to be passed to :manpage:`git-rev-list(1)`. They must not
            alter the output style of the command, or parsing will yield incorrect
            results.

        :return:
            An int defining the number of reachable commits
        ©ÚoptionsÚunsafe_optionsú--)
r   Úcheck_unsafe_optionsÚ_option_candidatesÚunsafe_git_rev_optionsÚlenr>   ÚgitÚrev_listr=   Ú
splitlines)rE   r|   r}   rX   s       rG   ÚcountzCommit.count  s¶   € ð. $ð 	ÝÔ$ÝÔ.¨r°6Ñ:Ô:È4ÔKfðñ ô ð ð ð 	`ÝÐ-�t”y”}Ô-¨d¬k¸4ÀÐQÐQÈ&ÐQÐQ×\Ò\Ñ^Ô^Ñ_Ô_Ð_ÝÐ)�4”9”=Ô)¨$¬+Ð@Ð@¸Ð@Ð@×KÒKÑMÔMÑNÔNÐNrH   c                 ó@   — | j         j                             | ¦  «        S )zÐ
        :return:
            String describing the commits hex sha based on the closest
            :class:`~git.refs.reference.Reference`.

        :note:
            Mostly useful for UI purposes.
        )r>   r‡   Úname_revrq   s    rG   rŒ   zCommit.name_rev2  s   € ð ŒyŒ}×%Ò% dÑ+Ô+Ð+rH   Úrevr+   c                 ó~  — d|v rt          d¦  «        ‚|s/t          j        t          j        |g|¦  «        | j        ¬¦  «         dg}|rIt          |t          t          j        f¦  «        r|f}nt          |¦  «        }| 
                    |¦  «          |j        j        ||fddi|¤Ž}|                      ||¦  «        S )a  Find all commits matching the given criteria.

        :param repo:
            The :class:`~git.repo.base.Repo`.

        :param rev:
            Revision specifier. See :manpage:`git-rev-parse(1)` for viable options.

        :param paths:
            An optional path or list of paths. If set only :class:`Commit`\s that
            include the path or paths will be considered.

        :param kwargs:
            Optional keyword arguments to :manpage:`git-rev-list(1)` where:

            * ``max_count`` is the maximum number of commits to fetch.
            * ``skip`` is the number of commits to skip.
            * ``since`` selects all commits since some date, e.g. ``"1970-01-01"``.

        :return:
            Iterator yielding :class:`Commit` items.
        Úprettyz<--pretty cannot be used as parsing expects single sha's onlyr   r‚   Ú
as_processT)ra   r   rƒ   r„   r…   rD   rx   Úosr*   rK   Úextendr‡   rˆ   Ú_iter_from_process_or_stream)	rL   r>   r�   r|   r}   rX   Ú	args_listÚ	paths_tupÚprocs	            rG   Ú
iter_itemszCommit.iter_items>  sæ   € ð> �vÐÐÝÐ[Ñ\Ô\Ð\ð $ð 	ÝÔ$ÝÔ.°¨u°fÑ=Ô=ÈcÔNhðñ ô ð ð &* Fˆ	àð 	(å˜%¥#¥r¤{Ð!3Ñ4Ô4ð )Ø"˜H�	�	å! %™LœL�	à×Ò˜YÑ'Ô'Ð'ð !ˆtŒxÔ   iÐKÐK¸DÐKÀFÐKÐKˆØ×/Ò/°°dÑ;Ô;Ð;rH   c                 ór   — |                      dd¦  «        }|dk    rd}||d<    | j        | j        | |fi |¤ŽS )a‹  Iterate *all* parents of this commit.

        :param paths:
            Optional path or list of paths limiting the :class:`Commit`\s to those that
            contain at least one of the paths.

        :param kwargs:
            All arguments allowed by :manpage:`git-rev-list(1)`.

        :return:
            Iterator yielding :class:`Commit` objects which are parents of ``self``
        Úskipr   r   )Úgetr—   r>   )rE   r|   rX   r™   s       rG   Úiter_parentszCommit.iter_parentsx  sN   € ð �zŠz˜& !Ñ$Ô$ˆØ�1Š9ˆ9ØˆDØˆˆv‰àˆtŒ˜tœy¨$°Ð@Ð@¸Ð@Ð@Ð@rH   c                 óÌ  — dt           t                   dt          fd„}| j        sP| j        j                             | j        ddddd¬¦  «                             ¦   «         dd…         } ||¦  «        }nW| j        j                             | j        d	         j        | j        dddd¬
¦  «                             ¦   «         } ||¦  «        }t          j
        | j        |¦  «        S )a´  Create a git stat from changes between this commit and its first parent
        or from all changes done if this is the very first commit.

        :note:
            If this commit is at the boundary of a shallow clone, this will
            raise :exc:`~git.exc.GitCommandError`, since the parent object
            was never fetched and only exists as a reference on this commit.

        :return:
            :class:`Stats`
        Úlinesr@   c           
      óü   — d}t          | | t          | ¦  «        dz  d …         ¦  «        D ]P\  }}|                     d¦  «        d         d         }|                     d¦  «        \  }}}||›d|›d|›d|›d�z  }ŒQ|S )Nr{   é   ú	r   éÿÿÿÿrv   )Úzipr†   ry   )r�   ÚtextÚ	file_infoÚlineÚchange_typeÚ
insertionsÚ	deletionsÚfilenames           rG   Úprocess_linesz#Commit.stats.<locals>.process_lines›  s›   € ØˆDÝ#& u¨eµC¸±J´JÀ!±OÐ4EÐ4EÔ.FÑ#GÔ#Gð \ð \‘�	˜4Ø'Ÿošo¨dÑ3Ô3°AÔ6°rÔ:�Ø48·J²J¸tÑ4DÔ4DÑ1�˜Y¨Ø¨k¨k¨k¸:¸:¸:ÀyÀyÀyÐRZÐRZÐRZÐ[Ñ[��ØˆKrH   r‚   T)ÚnumstatÚ
no_renamesÚrootÚrawr   Nr   )r«   r¬   r®   )r!   rx   r:   r>   r‡   Ú	diff_treer=   r‰   Údiffr   Ú_list_from_string)rE   rª   r�   r£   s       rG   ÚstatszCommit.stats�  só   € ð	¥¥c¤ð 	­sð 	ð 	ð 	ð 	ð Œ|ð 		(Ø”I”M×+Ò+Ø”˜T¨4¸DÀtÐQUð ,ñ ô çŠj‰lŒl˜1˜2˜2ôˆEð !�= Ñ'Ô'ˆDˆDà”I”M×&Ò&Ø”˜Q”Ô&¨¬°TÀ4ÐTXÐ^bð 'ñ ô çŠj‰lŒlð ð !�= Ñ'Ô'ˆDÝÔ& t¤y°$Ñ7Ô7Ð7rH   c                 ó€   — t          j        dt          d¬¦  «         d„ | j                             ¦   «         D ¦   «         S )al  Deprecated. Get the trailers of the message as a dictionary.

        :note:
            This property is deprecated, please use either :attr:`trailers_list` or
            :attr:`trailers_dict`.

        :return:
            Dictionary containing whitespace stripped trailer information.
            Only contains the latest instance of each trailer key.
        zWCommit.trailers is deprecated, use Commit.trailers_list or Commit.trailers_dict insteadrŸ   )Ú
stacklevelc                 ó&   — i | ]\  }}||d          “ŒS )r   r[   )r]   r^   Úvs      rG   r_   z#Commit.trailers.<locals>.<dictcomp>À  s"   € Ð?Ð?Ð?™D˜A˜q��1�Q”4Ð?Ð?Ð?rH   )ÚwarningsÚwarnÚDeprecationWarningÚtrailers_dictÚitemsrq   s    rG   ÚtrailerszCommit.trailers¯  sL   € õ 	ŒØeÝØð	
ñ 	
ô 	
ð 	
ð
 @Ð? DÔ$6×$<Ò$<Ñ$>Ô$>Ð?Ñ?Ô?Ð?rH   c                 ó`  — |                       | j        | j        dg| j        ¬¦  «                             ¦   «         }|sg S g }|                     d¦  «        D ]V}|                     dd¦  «        \  }}|                     |                     ¦   «         |                     ¦   «         f¦  «         ŒW|S )a’  Get the trailers of the message as a list.

        Git messages can contain trailer information that are similar to :rfc:`822`
        e-mail headers. See :manpage:`git-interpret-trailers(1)`.

        This function calls ``git interpret-trailers --parse`` onto the message to
        extract the trailer information, returns the raw trailer data as a list.

        Valid message with trailer::

            Subject line

            some body information

            another information

            key1: value1.1
            key1: value1.2
            key2 :    value 2 with inner spaces

        Returned list will look like this::

            [
                ("key1", "value1.1"),
                ("key1", "value1.2"),
                ("key2", "value 2 with inner spaces"),
            ]

        :return:
            List containing key-value tuples of whitespace stripped trailer information.
        z--parse)r;   rv   ú:r   )Ú_interpret_trailersr>   r9   r;   Ústripry   Úappend)rE   ÚtrailerÚtrailer_listÚtÚkeyÚvals         rG   Útrailers_listzCommit.trailers_listÂ  s«   € ðB ×*Ò*¨4¬9°d´lÀYÀKÐZ^ÔZgÐ*ÑhÔh×nÒnÑpÔpˆàð 	ØˆIàˆØ—’˜tÑ$Ô$ð 	<ð 	<ˆAØ—w’w˜s A‘”‰HˆC�Ø×Ò §¢¡¤¨c¯iªi©k¬kÐ :Ñ;Ô;Ð;Ð;àÐrH   Útrailer_argsc                 óh  — t          |t          ¦  «        r|n|                     |d¬¦  «        }|j        j        dg|¢}|j                             |dt          ¬¦  «        }	 |                     |¦  «        \  }}	|                     |d¬¦  «        t          |¦  «         S # t          |¦  «         w xY w)NÚstrict)Úerrorszinterpret-trailersT)r�   rV   )
rD   ÚbytesÚencoder‡   ÚGIT_PYTHON_GIT_EXECUTABLEÚexecuter   ÚcommunicateÚdecoder   )
rL   r>   r9   rÈ   r;   Úmessage_bytesÚcmdr–   Ústdout_bytesÚ_s
             rG   r¿   zCommit._interpret_trailersï  sÀ   € õ $.¨gµuÑ#=Ô#=Ðl˜˜À7Ç>Â>ÐRZÐckÀ>ÑClÔClˆØŒxÔ1Ð3GÐWÈ,ÐWˆØ"&¤(×"2Ò"2ØØÝð #3ñ #
ô #
ˆð
	#Ø"×.Ò.¨}Ñ=Ô=‰OˆL˜!Ø×&Ò& x¸Ð&ÑAÔAå˜TÑ"Ô"Ð"Ð"øÕ˜TÑ"Ô"Ð"Ð"øøøs   Á".B  Â B1c                 ó˜   — t          t          ¦  «        }| j        D ] \  }}||                              |¦  «         Œ!t	          |¦  «        S )a  Get the trailers of the message as a dictionary.

        Git messages can contain trailer information that are similar to :rfc:`822`
        e-mail headers. See :manpage:`git-interpret-trailers(1)`.

        This function calls ``git interpret-trailers --parse`` onto the message to
        extract the trailer information. The key value pairs are stripped of leading and
        trailing whitespaces before they get saved into a dictionary.

        Valid message with trailer::

            Subject line

            some body information

            another information

            key1: value1.1
            key1: value1.2
            key2 :    value 2 with inner spaces

        Returned dictionary will look like this::

            {
                "key1": ["value1.1", "value1.2"],
                "key2": ["value 2 with inner spaces"],
            }


        :return:
            Dictionary containing whitespace stripped trailer information, mapping
            trailer keys to a list of their corresponding values.
        )r   ÚlistrÇ   rÁ   Údict)rE   ÚdrÅ   rÆ   s       rG   rº   zCommit.trailers_dict  sL   € õF �ÑÔˆØÔ*ð 	ð 	‰HˆC�ØˆcŒF�MŠM˜#ÑÔÐÐÝ�A‰wŒwˆrH   Úproc_or_streamc              #   ó‚  K  — t          |d¦  «        r.t          t          |¦  «        }|j        }|€t	          d¦  «        ‚n7t          |d¦  «        rt          t
          |¦  «        }|}nt          d¦  «        ‚|j        }	  |¦   «         }|sn||                     ¦   «         }t          |¦  «        dk    r| 
                    dd¦  «        \  }}t          |¦  «        dk    sJ d	|z  ¦   «         ‚ | |t          |¦  «        ¦  «        V — Œ‰t          |d¦  «        r&t          t          |¦  «        }t          |¦  «         dS dS )
a�  Parse out commit information into a list of :class:`Commit` objects.

        We expect one line per commit, and parse the actual commit information directly
        from our lighting fast object database.

        :param proc:
            :manpage:`git-rev-list(1)` process instance - one sha per line.

        :return:
            Iterator supplying :class:`Commit` objects
        ÚwaitNzProcess has no stdout streamÚreadlinezExpected a process or streamTé(   r   zInvalid line: %s)Úhasattrr&   r   Ústdoutra   r   Ú	TypeErrorrÝ   rÀ   r†   ry   r   r   )rL   r>   rÚ   rT   rÝ   r¥   r=   rÕ   s           rG   r“   z#Commit._iter_from_process_or_stream,  se  è è € õ( �> 6Ñ*Ô*ð 		<Ý!¥%¨Ñ8Ô8ˆNØ#Ô*ˆFØˆ~Ý Ð!?Ñ@Ô@Ð@ð å�^ ZÑ0Ô0ð 	<Ý!¥" nÑ5Ô5ˆNØ#ˆFˆFåÐ:Ñ;Ô;Ð;à”?ˆð	0Ø�8‘:”:ˆDØð ØØ—Z’Z‘\”\ˆFÝ�6‰{Œ{˜RÒÐà ŸJšJ t¨QÑ/Ô/‘	�˜õ �v‘;”; "Ò$Ð$Ð$Ð&8¸6Ñ&AÑ$Ô$Ð$Ø�#�d�J vÑ.Ô.Ñ/Ô/Ð/Ð/Ð/ð	0õ  �> 6Ñ*Ô*ð 	-Ý!¥%¨Ñ8Ô8ˆNÝ˜^Ñ,Ô,Ð,Ð,Ð,ð	-ð 	-rH   Úparent_commitsÚheadÚauthor_dateÚcommit_dater¼   c                 óê  — |€!	 |j         j        g}n<# t          $ r g }Y n.w xY w|D ]'}t          || ¦  «        st          d|›d| › �¦  «        ‚Œ(|                     ¦   «         }t
          j        }|pt          j        |¦  «        }|pt          j	        |¦  «        }t          t          ¦   «         ¦  «        }t          ot          ¦   «         j        dk    }|rt          nt           }|                     | j        d¦  «        }|rt'          |¦  «        \  }}n|rt'          |¦  «        \  }}n||}}|                     | j        d¦  «        }|	rt'          |	¦  «        \  }}n|rt'          |¦  «        \  }}n||}}| j                             d¦  «        \  }}|                     ||| j        ¦  «        }t          |t2          ¦  «        st5          d¦  «        ‚t          |t2          ¦  «        r|                     |¦  «        }|
r¼g }t          |
t8          ¦  «        rJ|
                     ¦   «         D ]4\  }}|                     d¦  «         |                     |› d	|› �¦  «         Œ5n7|
D ]4\  }}|                     d¦  «         |                     |› d	|› �¦  «         Œ5|                      |t3          |¦  «        |¦  «        } | || j         ||||||||||¦  «        }|  !                    ||¦  «        |_"        |r�ddl#}	 |j          $                    ||¬
¦  «         n_# t          $ rR |j%        j&         '                    ||j         j(        |d|z  ¬
¦  «        }|j          )                    |d|z  ¬
¦  «         Y nw xY w|S )aÂ  Commit the given tree, creating a :class:`Commit` object.

        :param repo:
            :class:`~git.repo.base.Repo` object the commit should be part of.

        :param tree:
            :class:`~git.objects.tree.Tree` object or hex or bin sha.
            The tree of the new commit.

        :param message:
            Commit message. It may be an empty string if no message is provided. It will
            be converted to a string, in any case.

        :param parent_commits:
            Optional :class:`Commit` objects to use as parents for the new commit. If
            empty list, the commit will have no parents at all and become a root commit.
            If ``None``, the current head commit will be the parent of the new commit
            object.

        :param head:
            If ``True``, the HEAD will be advanced to the new commit automatically.
            Otherwise the HEAD will remain pointing on the previous commit. This could
            lead to undesired results when diffing files.

        :param author:
            The name of the author, optional.
            If unset, the repository configuration is used to obtain this value.

        :param committer:
            The name of the committer, optional.
            If unset, the repository configuration is used to obtain this value.

        :param author_date:
            The timestamp for the author field.

        :param commit_date:
            The timestamp for the committer field.

        :param trailers:
            Optional trailer key-value pairs to append to the commit message.
            Can be a dictionary mapping trailer keys to values, or a list of
            ``(key, value)`` tuples (useful when the same key appears multiple
            times, e.g. multiple ``Signed-off-by`` trailers). Trailers are
            appended using ``git interpret-trailers``.
            See :manpage:`git-interpret-trailers(1)`.

        :return:
            :class:`Commit` object representing the new commit.

        :note:
            Additional information about the committer and author are taken from the
            environment or from the git configuration. See :manpage:`git-commit-tree(1)`
            for more information.
        NzParent commit 'z' must be of type r   r{   ú.z)conf_encoding could not be coerced to strz	--trailerz: )Úlogmsgzcommit (initial): %szcommit: Switching to %s)*rã   r0   ra   rD   Úconfig_readerr‘   Úenvironr   r6   r3   Úintr   r	   r
   Útm_isdstr   r   rš   Úenv_author_dater   Úenv_committer_dateÚconf_encodingry   Ú	get_valueÚdefault_encodingrx   rá   r2   rØ   r»   rÁ   r¿   rc   rW   r?   Úgit.refsÚ
set_commitÚrefsÚHeadÚcreateÚrefÚset_reference) rL   r>   r2   r9   râ   rã   r3   r6   rä   rå   r¼   ÚpÚcrÚenvÚ	unix_timeÚis_dstÚoffsetÚauthor_date_strÚauthor_timeÚauthor_offsetÚcommitter_date_strÚcommitter_timeÚcommitter_offsetÚenc_sectionÚ
enc_optionrï   rÈ   rÅ   rÆ   rf   r‡   Úmasters                                    rG   Úcreate_from_treezCommit.create_from_tree`  s*  € ðH Ð!ð$Ø"&¤)Ô"2Ð!3��øÝð $ð $ð $à!#���ð$øøøð
 $ð Uð U�Ý! ! SÑ)Ô)ð UÝ$Ð%S°qÐ%SÐ%SÈcÐ%SÐ%SÑTÔTÐTðUð ×ÒÑ!Ô!ˆÝŒjˆàÐ4¥¤°Ñ!4Ô!4ˆ	ØÐ+�5œ<¨Ñ+Ô+ˆõ �™œ‘K”Kˆ	ÝÐ6�i™kœkÔ2°QÒ6ˆØ"Ð0•�­ˆàŸ'š' #Ô"5°rÑ:Ô:ˆØð 	;Ý)3°KÑ)@Ô)@Ñ&ˆK˜˜Øð 	;Ý)3°OÑ)DÔ)DÑ&ˆK˜˜à)2°F˜ˆKð !ŸWšW SÔ%;¸RÑ@Ô@ÐØð 	AÝ/9¸+Ñ/FÔ/FÑ,ˆNÐ,Ð,Øð 	AÝ/9Ð:LÑ/MÔ/MÑ,ˆNÐ,Ð,à/8¸&Ð,ˆNð #&Ô"3×"9Ò"9¸#Ñ">Ô">Ñˆ�ZØŸš [°*¸cÔ>RÑSÔSˆÝ˜-­Ñ-Ô-ð 	IÝÐGÑHÔHÐHõ �d�CÑ Ô ð 	#Ø—9’9˜T‘?”?ˆDð ð 	PØ&(ˆLÝ˜(¥DÑ)Ô)ð 9Ø (§¢Ñ 0Ô 0ð 9ð 9‘H�C˜Ø ×'Ò'¨Ñ4Ô4Ð4Ø ×'Ò'¨3¨¨°#¨¨Ñ8Ô8Ð8Ð8ð9ð !)ð 9ð 9‘H�C˜Ø ×'Ò'¨Ñ4Ô4Ð4Ø ×'Ò'¨3¨¨°#¨¨Ñ8Ô8Ð8Ð8à×-Ò-¨dµC¸±L´LÀ,ÑOÔOˆGð �SØØÔØØØØØØØØØØñ
ô 
ˆ
ð  ×/Ò/°°jÑAÔAˆ
Ôàð 	[ð ˆOˆOˆOð[Ø”	×$Ò$ Z¸Ð$Ñ@Ô@Ð@Ð@øÝð 	[ð 	[ð 	[ð œœ×-Ò-ØØ”I”MØØ1°GÑ;ð	 .ñ ô �ð ”	×'Ò'¨Ð7PÐSYÑ7YÐ'ÑZÔZÐZÐZÐZð	[øøøð Ðs   „ ’! !Ë7L ÌAM0Í/M0rT   c           
      óB  — |j         } |d| j        z                       d¦  «        ¦  «         | j        D ]#} |d|z                       d¦  «        ¦  «         Œ$| j        }|j        }| j        }d} ||d||j        | j        t          | j
        ¦  «        fz                       | j        ¦  «        ¦  «         |j        } ||d||j        | j        t          | j        ¦  «        fz                       | j        ¦  «        ¦  «         | j        | j        k    r& |d| j        z                       d¦  «        ¦  «         	 |                      d¦  «        r_ |d	¦  «         | j                             d
¦  «                             d
¦  «        D ]&} |d|z   d
z                        d¦  «        ¦  «         Œ'n# t&          $ r Y nw xY w |d¦  «         t)          | j        t,          ¦  «        r) || j                             | j        ¦  «        ¦  «         n || j        ¦  «         | S )Nztree %s
Úasciiz
parent %s
z%s %s <%s> %s %s
r3   r6   zencoding %s
r<   s   gpgsigrv   ú rw   )Úwriter2   rÍ   r:   r3   Únamer6   Úemailr4   r   r5   r;   r7   r8   rñ   Ú__getattribute__r<   Úrstripry   ÚAttributeErrorrD   r9   rx   )	rE   rT   r  rù   ÚaÚanameÚcÚfmtÚsiglines	            rG   rO   zCommit._serialize  sh  € Ø”ˆØˆˆ{˜TœYÑ&×.Ò.¨wÑ7Ô7Ñ8Ô8Ð8Ø”ð 	7ð 	7ˆAØˆE�= 1Ñ$×,Ò,¨WÑ5Ô5Ñ6Ô6Ð6Ð6àŒKˆØ”ˆØŒNˆØ"ˆØˆààØØ”GØÔ&Ý% dÔ&;Ñ<Ô<ðñ÷ Šf�T”]Ñ#Ô#ñ	
ô 	
ð 	
ð ”ˆØˆààØØ”GØÔ'Ý% dÔ&>Ñ?Ô?ðñ÷ Šf�T”]Ñ#Ô#ñ	
ô 	
ð 	
ð Œ=˜DÔ1Ò1Ð1ØˆE�? T¤]Ñ2×:Ò:¸7ÑCÔCÑDÔDÐDð	Ø×$Ò$ XÑ.Ô.ð BØ��iÑ Ô Ð Ø#œ{×1Ò1°$Ñ7Ô7×=Ò=¸dÑCÔCð Bð B�GØ�E˜3 ™=¨4Ñ/×7Ò7¸Ñ@Ô@ÑAÔAÐAÐAøøÝð 	ð 	ð 	ØˆDð	øøøð 	ˆˆe‰Œˆõ �d”l¥CÑ(Ô(ð 	 ØˆE�$”,×%Ò% d¤mÑ4Ô4Ñ5Ô5Ð5Ð5àˆE�$”,ÑÔÐàˆs   Ä<A4F1 Æ1
F>Æ=F>c           
      óX  — |j         }t          | j        t           |¦   «                              ¦   «         d         ¦  «        t          j        dz  d¦  «        | _        g | _        d }	  |¦   «         }|                     d¦  «        s|}no| j         	                     t          | ¦  «        | j        t          |                     ¦   «         d                              d¦  «        ¦  «        ¦  «        ¦  «         Œ‘t          | j        ¦  «        | _        |} |¦   «         } |¦   «         }|                     d¦  «        rS |¦   «         }|                     d	¦  «        r |¦   «         }|                     d	¦  «        °|                     d¦  «        °S| j        | _        d| _        |}|                     ¦   «         }|�r|d
d…         dk    r?||                     d	¦  «        dz   d …                              | j        d¦  «        | _        nª|d
d…         dk    rœ||                     d	¦  «        dz   d …         dz   }	d}
	  |¦   «         }|sn3|d
d…         d	k    r|                     ¦   «         }d}
n|	|dd …         z  }	Œ@|	                     d¦  «                             | j        d¦  «        | _        |
rŒú |¦   «                              ¦   «         }|�°	 t'          |                     | j        d¦  «        ¦  «        \  | _        | _        | _        n3# t.          $ r& t0                               d|| j        d¬¦  «         Y nw xY w	 t'          |                     | j        d¦  «        ¦  «        \  | _        | _        | _        n3# t.          $ r& t0                               d|| j        d¬¦  «         Y nw xY w|                     ¦   «         | _        	 | j                             | j        d¦  «        | _        n8# t.          $ r+ t0                               d| j        | j        d¬¦  «         Y nw xY w| S )Nr   é   r{   Ts   parentr¡   r
  s	   mergetag ó    r   é
   s	   encoding Úignoreé   s   gpgsig rw   Frg   z3Failed to decode author line '%s' using encoding %s)Úexc_infoz6Failed to decode committer line '%s' using encoding %sz/Failed to decode message '%s' using encoding %s)rÝ   r   r>   r   ry   Útree_idr2   r:   Ú
startswithrÁ   r1   rÑ   rK   rñ   r;   r<   rÀ   Úfindr  r   r3   r4   r5   ÚUnicodeDecodeErrorÚ_loggerÚerrorr6   r7   r8   rl   r9   )rE   rT   rÝ   Ú	next_lineÚparent_lineÚauthor_lineÚcommitter_lineÚencÚbufÚsigÚis_next_headerÚsigbufs               rG   rk   zCommit._deserializeU  s�  € Ø”?ˆÝ˜œ¥J¨x¨x©z¬z×/?Ò/?Ñ/AÔ/AÀ!Ô/DÑ$EÔ$EÅtÄ|ÐWYÑGYÐ[]Ñ^Ô^ˆŒ	àˆŒØˆ	ð	lØ"˜(™*œ*ˆKØ×)Ò)¨)Ñ4Ô4ð Ø'�	ØàŒL×Ò 
¥ T¡
¤
¨4¬9µjÀ×ARÒARÑATÔATÐUWÔAX×A_ÒA_Ð`gÑAhÔAhÑ6iÔ6iÑ jÔ jÑkÔkÐkð	lõ ˜Tœ\Ñ*Ô*ˆŒð  ˆØ!˜™œˆð �H‘J”Jˆ	Ø×"Ò" <Ñ0Ô0ð 	'Ø ˜™
œ
ˆIØ×&Ò& tÑ,Ô,ð 'Ø$˜H™JœJ�	ð ×&Ò& tÑ,Ô,ð 'ð ×"Ò" <Ñ0Ô0ð 	'ð Ô-ˆŒØˆŒð ˆØ�iŠi‰kŒkˆØñ 	%Ø�1�R�4Œy˜LÒ(Ð(Ø # C§H¢H¨T¡N¤N°QÑ$6Ð$8Ð$8Ô 9× @Ò @ÀÄÐPXÑ YÔ Y�”�Ø�Q�q�S”˜ZÒ'Ð'Ø˜#Ÿ(š( 4™.œ.¨1Ñ,Ð.Ð.Ô/°%Ñ7�Ø!&�ð&Ø%˜X™ZœZ�FØ!ð ØØ˜a ˜c”{ dÒ*Ð*Ø$Ÿlšl™nœn˜Ø)-˜ØØ˜6 ! " "œ:Ñ%�Cð&ð "Ÿjšj¨Ñ/Ô/×6Ò6°t´}ÀhÑOÔO�”Ø!ð ØØ�(‘*”*×"Ò"Ñ$Ô$ˆCð' ñ 	%ð,	õ
 % [×%7Ò%7¸¼ÀyÑ%QÔ%QÑRÔRñ	Ø”ØÔ"ØÔ%Ð%øå!ð 	ð 	ð 	Ý�MŠMØEØØ”Øð	 ñ ô ð ð ð ð	øøøð	õ
 % ^×%:Ò%:¸4¼=È)Ñ%TÔ%TÑUÔUñ	Ø”ØÔ#ØÔ(Ð(øå!ð 	ð 	ð 	Ý�MŠMØHØØ”Øð	 ñ ô ð ð ð ð	øøøð —{’{‘}”}ˆŒð	Øœ<×.Ò.¨t¬}¸iÑHÔHˆDŒLˆLøÝ!ð 	ð 	ð 	Ý�MŠMØAØ”Ø”Øð	 ñ ô ð ð ð ð	øøøð ˆs6   Ë;L Ì-L?Ì>L?Í;M? Í?-N/Î.N/Ï%O2 Ï22P'Ð&P'c                 ó¾   — g }| j         rSt          j        dt          | j         ¦  «        t          j        ¦  «        }|D ]}|                     t          |Ž ¦  «         Œ|S )a  Search the commit message for any co-authors of this commit.

        Details on co-authors:
        https://github.blog/2018-01-29-commit-together-with-co-authors/

        :return:
            List of co-authors for this commit (as :class:`~git.util.Actor` objects).
        z^Co-authored-by: (.*) <(.*?)>$)r9   ÚreÚfindallrx   Ú	MULTILINErÁ   r   )rE   Ú
co_authorsÚresultsr3   s       rG   r1  zCommit.co_authors¿  sk   € ð ˆ
àŒ<ð 	2Ý”jØ1Ý�D”LÑ!Ô!Ý”ñô ˆGð
 "ð 2ð 2�Ø×!Ò!¥%¨ .Ñ1Ô1Ð1Ð1àÐrH   )NNNNNNNNNNN)r{   F)r{   )NFNNNNN);Ú__name__Ú
__module__Ú__qualname__Ú__doc__rí   rî   rï   rñ   r…   r1   r)   Ú__annotations__r`   Ú_id_attribute_r"   rÌ   r%   r   r   rë   Úfloatrx   rC   Úclassmethodr#   rM   rW   r   rg   rm   ÚpropertyÚdatetimerr   rt   rz   r*   ÚboolrŠ   rŒ   r    r—   r›   r   r²   r   r¼   r!   rÇ   r¿   rº   r   r   r“   r  r   rO   rk   r1  Ú__classcell__)rF   s   @rG   r   r   C   sŒ  ø€ € € € € € ðð ð (€OØ-Ðð *€Mð Ðð 	ØðÐð
 '€Dˆ'�(Ô
Ð&Ð&Ñ&ð€Ið €Nà�hÔÐÐÑð #'Ø%)Ø*.Ø/3Ø(,Ø+/Ø26Ø+/Ø37Ø%)Ø#'ðX!ð X!àðX!ð ðX!ð �D˜$�JÔð	X!ð
 �e˜T�kÔ"ðX!ð ˜S $˜YÔ'ðX!ð    e Ô,ðX!ð ˜ ˜Ô%ðX!ð ˜c 4˜iÔ(ðX!ð # 4¨ ;Ô/ðX!ð �s˜E 4Ð'Ô(ðX!ð �x Ô)¨4Ð/Ô0ðX!ð ˜˜T˜	Ô"ðX!ð �c˜4�iÔ ðX!ð 
ðX!ð X!ð X!ð X!ð X!ð X!ðt ð%¨Xð %¸%ÀÔ:Nð %ð %ð %ñ „[ð%ð ð 6ð °8ð Àð ð ð ñ „[ðð$ ð ¨ð ð ð ð ð&& ð &¨ð &ð &ð &ð &ð &ð &ð ðI 8Ô#4ð Ið Ið Iñ „XðIð ðM HÔ$5ð Mð Mð Mñ „XðMð ð3˜˜s E˜zÔ*ð 3ð 3ð 3ñ „Xð3ð 68Ø%*ð Oð  Oà�X˜x¨Ô1Ð1Ô2ð Oð #ð Oð ð	 Oð
 
ð Oð  Oð  Oð  OðD ð	,˜#ð 	,ð 	,ð 	,ñ „Xð	,ð ð
 68Ø%*ð7<ð 7<àð7<ð �3˜Ð"5Ð5Ô6ð7<ð �X˜x¨Ô1Ð1Ô2ð	7<ð
 #ð7<ð ð7<ð 
�(Ô	ð7<ð 7<ð 7<ñ „[ð7<ðrAð A %¨°(¸8Ô2DÐ(DÔ"Eð AÐVYð AÐ^fÐgoÔ^pð Að Að Að Að* ð8�uð 8ð 8ð 8ñ „Xð8ðB ð@˜$˜s C˜xœ.ð @ð @ð @ñ „Xð@ð$ ð*˜t E¨#¨s¨(¤OÔ4ð *ð *ð *ñ „Xð*ðX ð )ð#ð #àð#ð �s˜E�zÔ"ð#ð ˜s”mð	#ð
 ð#ð 
ð#ð #ð #ñ „[ð#ð( ð%˜t C¨¨c¬ NÔ3ð %ð %ð %ñ „Xð%ðN ð1-°ð 1-ÈÈeÐUWÈiÔHXð 1-Ð]eÐfnÔ]oð 1-ð 1-ð 1-ñ „[ð1-ðf ð 7;ØØ%)Ø(,Ø;?Ø;?ØGKðuð uàðuð �D˜#�IÔðuð ð	uð
 ˜d D¨¤NÐ2Ô3ðuð ðuð �d˜E�kÔ"ðuð ˜˜u˜Ô%ðuð ˜4  hÔ&7Ð7Ô8ðuð ˜4  hÔ&7Ð7Ô8ðuð ˜˜d 3¨ 8œn¨d°5¸¸c¸´?Ô.CÐCÔDðuð 
ðuð uð uñ „[ðuðr9 ð 9¨Xð 9ð 9ð 9ð 9ðvf 7ð f¨xð fð fð fð fðT ð˜D œKð ð ð ñ „Xðð ð ð ð rH   )BÚ__all__Úcollectionsr   r<  Úior   Úloggingr‘   r.  Ú
subprocessr   r   Úsysr   r   r	   r
   r   r·   Úgitdbr   Úgit.cmdr   Úgit.diffr   Úgit.utilr   r   r   r   r{   r   r2   r   Úutilr   r   r   r   r   r   Útypingr   r   r   r    r!   r"   r#   r$   r%   r&   Úversion_infor)   Útyping_extensionsÚ	git.typesr*   rò   r+   Úgit.repor,   Ú	getLoggerr3  r"  ÚObjectr   r[   rH   rG   ú<module>rQ     sÀ  ðð ˆ*€à #Ð #Ð #Ð #Ð #Ð #Ø €€€Ø Ð Ð Ð Ð Ð Ø €€€Ø 	€	€	€	Ø 	€	€	€	Ø "Ð "Ð "Ð "Ð "Ð "Ð "Ð "Ø 
€
€
€
Ø =Ð =Ð =Ð =Ð =Ð =Ð =Ð =Ð =Ð =Ð =Ð =Ð =Ð =Ø €€€à Ð Ð Ð Ð Ð à Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?à Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð ðð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ðð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð Ô�vÒÐØÐÐÐÐÐÐà)Ð)Ð)Ð)Ð)Ð)à Ð Ð Ð Ð Ð àð Ø*Ð*Ð*Ð*Ð*Ð*ØÐÐÐÐÐð ˆ'Ô
˜HÑ
%Ô
%€ðQð Qð Qð Qð QˆTŒ[Ð0°(¸Lñ Qô Qð Qð Qð QrH   