
    ch)                         S r SS/rSSKJrJr  SSKJr  SSKJr  SSK	J
r
  SS	KJr  SS
KJrJrJrJr  SSKJrJr  \(       a  SSKJr  SSKJr  SSKJr  S\S\4S jr " S S\5      r " S S\
5      rg)zcSome ref-based objects.

Note the distinction between the :class:`HEAD` and :class:`Head` classes.
HEADHead    )GitConfigParserSectionConstraint)GitCommandError)	join_path   )	Reference)SymbolicReference)AnySequenceTYPE_CHECKINGUnion)
Commit_ishPathLike)CommitRemoteReference)Repostringreturnc                 h    U R                  S5      (       a  U R                  S5      (       a  U SS $ U $ )N"r	   )
startswithendswith)r   s    `C:\Users\julio\OneDrive\Documentos\Trabajo\Ideas Frescas\venv\Lib\site-packages\git/refs/head.pystrip_quotesr       s2    &//#"6"6a|M    c                      ^  \ rS rSr% SrS rSrSrS\S'   \4SSS	\	S
S4U 4S jjjr
S
\4S jr    SS\\\\4   S\S\S\\	\\	   S4   S\S
S 4S jjrSrU =r$ )r   &   zmSpecial case of a :class:`~git.refs.symbolic.SymbolicReference` representing the
repository's HEAD reference.	ORIG_HEAD r   commitrepor   pathr   Nc                 |   > X R                   :w  a  [        SU R                   < SU< 35      e[        TU ]  X5        g )NzHEAD instance must point to z, got )
_HEAD_NAME
ValueErrorsuper__init__)selfr%   r&   	__class__s      r   r+   HEAD.__init__2   s/    ??"Z^_``$r   c                 B    [        U R                  U R                  5      $ )z
:return:
    :class:`~git.refs.symbolic.SymbolicReference` pointing at the ORIG_HEAD,
    which is maintained to contain the previous value of HEAD.
)r   r%   _ORIG_HEAD_NAMEr,   s    r   	orig_headHEAD.orig_head7   s     !D,@,@AAr   indexworking_treepathskwargsc                 
   SnU(       a  SnU(       a  SnU(       a  SnU(       d  [        S5      e U R                  R                  R                  " XaSU40 UD6  U $ ! [         a  nUR
                  S:w  a  e  SnAU $ SnAff = f)a  Reset our HEAD to the given commit optionally synchronizing the index and
working tree. The reference we refer to will be set to commit as well.

:param commit:
    :class:`~git.objects.commit.Commit`, :class:`~git.refs.reference.Reference`,
    or string identifying a revision we should reset HEAD to.

:param index:
    If ``True``, the index will be set to match the given commit.
    Otherwise it will not be touched.

:param working_tree:
    If ``True``, the working tree will be forcefully adjusted to match the given
    commit, possibly overwriting uncommitted changes without warning.
    If `working_tree` is ``True``, `index` must be ``True`` as well.

:param paths:
    Single path or list of paths relative to the git root directory
    that are to be reset. This allows to partially reset individual files.

:param kwargs:
    Additional arguments passed to :manpage:`git-reset(1)`.

:return:
    self
z--softz--mixedNz--hardz?Cannot reset the working tree if the index is not reset as wellz--r	   )r)   r%   gitresetr   status)r,   r$   r4   r5   r6   r7   modees           r   r:   
HEAD.reset?   s    F D  D !bcc	IIMMdEDVD   	 xx1}  	s   )A 
B&A==B)r   TFN)__name__
__module____qualname____firstlineno____doc__r(   r0   	__slots____annotations__r   r+   r   r2   r   r   strboolr   r   r:   __static_attributes____classcell__)r-   s   @r   r   r   &   s    $ J!OI 6@ %V %8 %T % %
B, B =C";?>j"3S89> > 	>
 Xx1478> > 
> >r   c                       \ rS rSrSrSrSrSr\SS.SS	S
SS\	S\
SS4
S jj5       rS\S   SS 4S jrS\S   4S jrSS\S\	SS 4S jjrSS\	S\
S\S   4S jjrS\	S\\   4S jrS\\   4S jrS\\   4S jrSrg)r      a  A Head is a named reference to a :class:`~git.objects.commit.Commit`. Every Head
instance contains a name and a :class:`~git.objects.commit.Commit` object.

Examples::

    >>> repo = Repo("/path/to/repo")
    >>> head = repo.heads[0]

    >>> head.name
    'master'

    >>> head.commit
    <git.Commit "1c09f116cbc2cb4100fb6935bb162daa4723f455">

    >>> head.commit.hexsha
    '1c09f116cbc2cb4100fb6935bb162daa4723f455'
z
refs/headsremotemergeF)forcer%   r   headszUnion[Head, str]rN   r7   r   Nc                T    SnU(       a  SnUR                   R                  " U/UQ76   g)zDelete the given heads.

:param force:
    If ``True``, the heads will be deleted even if they are not yet merged into
    the main development stream. Default ``False``.
z-dz-DN)r9   branch)clsr%   rN   rO   r7   flags         r   deleteHead.delete   s&     D%u%r   remote_reference)r   Nc                 6   SSK Jn  Ub  [        X5      (       d  [        SU-  5      eU R	                  5        nUcd  UR                  U R                  5        UR                  U R                  5        [        UR                  5       5      S:X  a  UR                  5         O_UR                  U R                  UR                  5        UR                  U R                  [        R                  UR                  5      5        SSS5        U $ ! , (       d  f       U $ = f)zConfigure this branch to track the given remote reference. This will
alter this branch's configuration accordingly.

:param remote_reference:
    The remote reference to track or None to untrack any references.

:return:
    self
r	   r   NzIncorrect parameter type: %rr   )rL   r   
isinstancer)   config_writerremove_optionk_config_remotek_config_remote_reflenoptionsremove_section	set_valueremote_namer   to_full_pathremote_head)r,   rV   r   writers       r   set_tracking_branchHead.set_tracking_branch   s     	,'
;K0]0];>NNOO !V'$$T%9%9:$$T%=%=>v~~'(A-))+  !5!57G7S7ST  ,,%%&6&B&BC "  "! s   CD		
Dc           
         SSK Jn  U R                  5       nUR                  U R                  5      (       a  UR                  U R
                  5      (       a  [        U R                  [        R                  [        UR                  U R
                  5      5      5      5      nUR                  " [        UR                  U R                  5      UR                  5      5      nU" U R                  U5      $ g)ze
:return:
    The remote reference we are tracking, or ``None`` if we are not a tracking
    branch.
r	   r   N)rL   r   config_reader
has_optionr[   r\   r   r%   rb   r   	get_valuer   name)r,   r   readerrefremote_refpaths        r   tracking_branchHead.tracking_branch   s     	,##%T1122v7H7HIaIa7b7b		!!,v/?/?@X@X/Y"Z[C -99)FDTDTUYUiUiDjloltlt:uvN"499n== r   new_pathc                     SnU(       a  SnU R                   R                  R                  X0U5        U R                  < SU< 3U l        U $ )af  Rename self to a new path.

:param new_path:
    Either a simple name or a path, e.g. ``new_name`` or ``features/new_name``.
    The prefix ``refs/heads`` is implied.

:param force:
    If ``True``, the rename will succeed even if a head with the target name
    already exists.

:return:
    self

:note:
    Respects the ref log, as git commands are used.
z-mz-M/)r%   r9   rQ   _common_path_defaultr&   )r,   rq   rN   rS   s       r   renameHead.rename   s@    " D		T2#88(C	r   )r   r   c                 ,   XS'   US   SL a  UR                  S5        U R                  R                  R                  " U 40 UD6  U R                  R                  R
                  (       a  U R                  R                  $ U R                  R                  $ )a  Check out this head by setting the HEAD to this reference, by updating the
index to reflect the tree we point to and by updating the working tree to
reflect the latest index.

The command will fail if changed working tree files would be overwritten.

:param force:
    If ``True``, changes to the index and the working tree will be discarded.
    If ``False``, :exc:`~git.exc.GitCommandError` will be raised in that
    situation.

:param kwargs:
    Additional keyword arguments to be passed to git checkout, e.g.
    ``b="new_branch"`` to create a new branch at the given spot.

:return:
    The active branch after the checkout operation, usually self unless a new
    branch has been created.
    If there is no active branch, as the HEAD is now detached, the HEAD
    reference will be returned instead.

:note:
    By default it is only allowed to checkout heads - everything else will leave
    the HEAD detached which is allowed and possible, but remains a special state
    that some tools might not be able to handle.
fF)popr%   r9   checkoutheadis_detachedactive_branch)r,   rN   r7   s      r   rz   Head.checkout   sl    6 s#;%JJsO		t.v.99>>%%99>>!99***r   	read_onlyc                     U(       a  U R                   R                  5       nOU R                   R                  5       n[        USU R                  -  5      $ )Nzbranch "%s")r%   rh   rY   r   rk   )r,   r   parsers      r   _config_parserHead._config_parser  sA    YY,,.FYY,,.F !)BCCr   c                      U R                  SS9$ )zc
:return:
    A configuration parser instance constrained to only read this instance's
    values.
Tr   r   r1   s    r   rh   Head.config_reader   s     ""T"22r   c                      U R                  SS9$ )zf
:return:
    A configuration writer instance with read-and write access to options of
    this head.
Fr   r   r1   s    r   rY   Head.config_writer(  s     ""U"33r   )r&   )F)r?   r@   rA   rB   rC   rt   r[   r\   classmethodrG   r   rT   r   re   ro   r   ru   rz   r   r   r   rh   rY   rH   r#   r   r   r   r      s    $ (O!LQ 
&& 
&*< 
&T 
&]` 
&ei 
& 
&E:Q4R W] >'>!? *x   2#+d #+c #+eN>S #+LD D1B?1S D30A 340A 4r   N)rC   __all__
git.configr   r   git.excr   git.utilr   	referencer
   symbolicr   typingr   r   r   r   	git.typesr   r   git.objectsr   git.refsr   git.repor   rF   r   r   r   r#   r   r   <module>r      sm   
 6
 9 #    ' 7 6 *"(
  W Wtn49 n4r   