
    ch                        S r / SQrSSKJrJrJrJrJrJrJ	r	J
r
  SSKJr  SSKJr  SSKJrJrJrJrJr  SSKJr  \(       a  SSKJ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 S\5      r% " S S \%5      r& " S! S"\!5      r' " S# S$\5      r(g%)&z-Exceptions thrown throughout the git package.)AmbiguousObjectNameBadName	BadObjectBadObjectTypeInvalidDBRootODBError
ParseErrorUnsupportedOperationGitErrorInvalidGitRepositoryErrorWorkTreeRepositoryUnsupportedNoSuchPathErrorUnsafeProtocolErrorUnsafeOptionErrorCommandErrorGitCommandNotFoundGitCommandErrorCheckoutError
CacheErrorUnmergedEntriesErrorHookExecutionErrorRepositoryDirtyError    )r   r   r   r   r   r   r   r	   safe_decode)remove_password_if_present)ListSequenceTupleTYPE_CHECKINGUnion)PathLike)Repoc                       \ rS rSrSrSrg)r
   =   z&Base class for all package exceptions. N__name__
__module____qualname____firstlineno____doc____static_attributes__r%       ZC:\Users\julio\OneDrive\Documentos\Trabajo\Ideas Frescas\venv\Lib\site-packages\git/exc.pyr
   r
   =   s    0r-   r
   c                       \ rS rSrSrSrg)r   A   zAThrown if the given repository appears to have an invalid format.r%   Nr&   r%   r-   r.   r   r   A   s    Kr-   r   c                       \ rS rSrSrSrg)r   E   z:Thrown to indicate we can't handle work tree repositories.r%   Nr&   r%   r-   r.   r   r   E   s    Dr-   r   c                       \ rS rSrSrSrg)r   I   z3Thrown if a path could not be access by the system.r%   Nr&   r%   r-   r.   r   r   I   s    =r-   r   c                       \ rS rSrSrSrg)r   M   zGThrown if unsafe protocols are passed without being explicitly allowed.r%   Nr&   r%   r-   r.   r   r   M   s    Qr-   r   c                       \ rS rSrSrSrg)r   Q   zEThrown if unsafe options are passed without being explicitly allowed.r%   Nr&   r%   r-   r.   r   r   Q   s    Or-   r   c                       \ rS rSrSrSr    SS\\\   \	\S4   \4   S\\\
S\4   S\\\S4   S	\\\S4   S
S4
S jjrS
\4S jrSrg)r   U   zBase class for exceptions thrown at every stage of :class:`~subprocess.Popen`
execution.

:param command:
    A non-empty list of argv comprising the command-line.
zCmd('%s') failed%sNcommand.statusstderrstdoutreturnc                 $   [        U[        [        45      (       d  UR                  5       n[	        U5      U l        X l        U(       aT  [        U[        5      (       a0  [        U5      R                  < S[        [        U5      5      < S3nO S[        U5      -  n[        U R
                  S   5      U l        SR!                  S U R
                   5       5      U l        U=(       a    SU-  =(       d    S	U l        [        U5      n[        U5      nU=(       a    S
U-  =(       d    SU l        U=(       a    SU-  =(       d    SU l        g ! [        [        4 a3    [        [        U5      5      n[        U[        5      (       a  SU-  OUn Nf = f)Nz('z')zexit code(%s)z'%s'r    c              3   8   #    U  H  n[        U5      v   M     g 7fNr   ).0is     r.   	<genexpr>(CommandError.__init__.<locals>.<genexpr>{   s      FAQs   z due to: %s!z
  stdout: '%s' z
  stderr: '%s')
isinstancetuplelistsplitr   r;   r<   	Exceptiontyper'   r   strint
ValueError	TypeError_cmdjoin_cmdline_causer>   r=   )selfr;   r<   r=   r>   sstdout_decodestderr_decodes           r.   __init__CommandError.__init__e   s7    'E4=11mmoG1':&),,'+F|'<'<k#f+>VWJ,s6{:F
  Q0	 F FF7!7>3#F+#F+#J(:](JPb#J(:](JPb #I. J#CK0A+5fc+B+BVaZFJs   E A FFc                     U R                   S-   U R                  U R                  U R                  U R                  U R
                  4-  $ )Nz
  cmdline: %s%s%s)_msgrT   rW   rV   r>   r=   rX   s    r.   __str__CommandError.__str__   sA    		11IIKKMMKKKK6
 
 	
r-   )rW   rT   rV   r;   r<   r=   r>   NNN)r'   r(   r)   r*   r+   r_   r    r   rP   r   rQ   rN   bytesr\   ra   r,   r%   r-   r.   r   r   U   s      D 48*.*.QtCy%S/367Q c3i/0Q eS$&'	Q
 eS$&'Q 
Q:
 
r-   r   c                   ^   ^  \ rS rSrSrS\\\   \\   \4   S\\\	4   SS4U 4S jjr
SrU =r$ )	r      zThrown if we cannot find the ``git`` executable in the :envvar:`PATH` or at the
path given by the :envvar:`GIT_PYTHON_GIT_EXECUTABLE` environment variable.r;   causer?   Nc                 2   > [         TU ]  X5        SU l        g )NzCmd('%s') not found%ssuperr\   r_   )rX   r;   rg   	__class__s      r.   r\   GitCommandNotFound.__init__   s    (+	r-   r_   )r'   r(   r)   r*   r+   r    r   rP   r   rN   r\   r,   __classcell__rk   s   @r.   r   r      sI    S,d3isS&@ A ,%PSU^P^J_ ,dh , ,r-   r   c                      ^  \ rS rSrSr   SS\\\   \\S4   \4   S\\\	S\
4   S\\\S4   S\\\S4   S	S4
U 4S
 jjjrSrU =r$ )r      zGThrown if execution of the git command fails with non-zero status code.Nr;   .r<   r=   r>   r?   c                 &   > [         TU ]  XX45        g rC   )rj   r\   rX   r;   r<   r=   r>   rk   s        r.   r\   GitCommandError.__init__   s     	&9r-   r%   rc   r'   r(   r)   r*   r+   r    r   rP   r   rQ   rN   rd   r\   r,   rn   ro   s   @r.   r   r      s    Q
 48*.*.:tCy%S/367: c3i/0: eS$&'	:
 eS$&': 
: :r-   r   c            
       V    \ rS rSrSrS\S\\   S\\   S\\   SS4
S	 jr	S\4S
 jr
Srg)r      a  Thrown if a file could not be checked out from the index as it contained
changes.

The :attr:`failed_files` attribute contains a list of relative paths that failed to
be checked out as they contained changes that did not exist in the index.

The :attr:`failed_reasons` attribute contains a string informing about the actual
cause of the issue.

The :attr:`valid_files` attribute contains a list of relative paths to files that
were checked out successfully and hence match the version stored in the index.
messagefailed_filesvalid_filesfailed_reasonsr?   Nc                 R    [         R                  X5        X l        X@l        X0l        g rC   )rN   r\   ry   r{   rz   )rX   rx   ry   rz   r{   s        r.   r\   CheckoutError.__init__   s$     	4)(,&r-   c                 L    [         R                  U 5      SU R                  -  -   $ )Nz:%s)rN   ra   ry   r`   s    r.   ra   CheckoutError.__str__   s#      &1B1B)BBBr-   )ry   r{   rz   )r'   r(   r)   r*   r+   rP   r   r!   r   r\   ra   r,   r%   r-   r.   r   r      sX    
'
' x(
' h'	
'
 S	
' 

'C Cr-   r   c                       \ rS rSrSrSrg)r      zQBase for all errors related to the git index, which is called "cache"
internally.r%   Nr&   r%   r-   r.   r   r      s    r-   r   c                       \ rS rSrSrSrg)r      zWThrown if an operation cannot proceed as there are still unmerged
entries in the cache.r%   Nr&   r%   r-   r.   r   r      s    r-   r   c                      ^  \ rS rSrSr  SS\\\   \\S4   \4   S\\\	S\
4   S\\\S4   S\\\S4   S	S4
U 4S
 jjjrSrU =r$ )r      zThrown if a hook exits with a non-zero exit code.

This provides access to the exit code and the string returned via standard output.
Nr;   .r<   r=   r>   r?   c                 4   > [         TU ]  XX45        SU l        g )NzHook('%s') failed%sri   rs   s        r.   r\   HookExecutionError.__init__   s     	&9)	r-   rm   )NNru   ro   s   @r.   r   r      s     +/*.*tCy%S/367* c3i/0* eS$&'	*
 eS$&'* 
* *r-   r   c                   <    \ rS rSrSrSSS\SS4S jrS\4S	 jrS
rg)r      zkThrown whenever an operation on a repository fails as it has uncommitted changes
that would be overwritten.repor"   rx   r?   Nc                     Xl         X l        g rC   r   rx   )rX   r   rx   s      r.   r\   RepositoryDirtyError.__init__   s    	r-   c                 >    SU R                   < SU R                  < 3$ )Nz!Operation cannot be performed on z: r   r`   s    r.   ra   RepositoryDirtyError.__str__   s    <@IIt||TTr-   )rx   r   )	r'   r(   r)   r*   r+   rP   r\   ra   r,   r%   r-   r.   r   r      s/    "V c d U Ur-   r   N))r+   __all__	gitdb.excr   r   r   r   r   r   r   r	   
git.compatr   git.utilr   typingr   r   r   r   r    	git.typesr!   git.repo.baser"   rN   r
   r   r   OSErrorr   r   r   r   r   r   r   r   r   r   r   r%   r-   r.   <module>r      s    46	 	 	 # / ? > "
1y 1L LE$= E>h >R( RP P4
8 4
n, ,
:l 
:CH C< 
: 
* *"	U8 	Ur-   