403Webshell
Server IP : 50.21.180.56  /  Your IP : 216.73.216.139
Web Server : Apache
System : Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
User : ws67922704 ( 67922704)
PHP Version : 8.5.13
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /kunden/proc/self/root/usr/lib/python3/dist-packages/dulwich/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /kunden/proc/self/root/usr/lib/python3/dist-packages/dulwich/__pycache__/repo.cpython-313.pyc
�

mEdg)���&�SrSSKrSSKrSSKrSSKrSSKrSSKJr SSKJ	r	 SSK
JrJrJ
r
JrJrJr \(aSSKJrJr SSKJr SS	KJrJrJrJrJrJrJrJrJr SS
K J!r! SSK"J#r#J$r$J%r%J&r&J'r' SSK(J)r)J*r* SS
K+J,r,J-r-J.r.J/r/J0r0J1r1 SSK2J3r3J4r4J5r5J6r6J7r7J8r8J9r9J:r: SSK;J<r< SSK=J>r>J?r?J@r@JArAJBrBJCrCJDrDJErEJFrFJGrGJHrHJIrIJJrJJKrKJLrLJMrMJNrN SrOSrPSrQSrRSrSSrTSrUSrVSrWS/\Q/\Q\R/\Q\S/S/S//rXSrY"SS\Z5r["S S!\Z5r\S"\]\^\^44S#jr_S:S$S%S&\\^S"\`4S'jjraS;S(jrbS)\\`S"\c\`\d\`44S*jreS)\c\`\d\`4S"\`4S+jrfS;S,jrg"S-S.5rh"S/S05riS1rj"S2S3\Z5rk"S4S5\Z5rl"S6S7\i5rm"S8S9\i5rng)<z�Repository access.

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

�N)�Iterable)�BytesIO)�
TYPE_CHECKING�Any�BinaryIO�Callable�Optional�Union���
ConfigFile�
StackedConfig��Index)	�CommitError�	HookError�NoIndexPresent�NotBlobError�NotCommitError�NotGitRepository�NotTagError�NotTreeError�RefFormatError)�GitFile)�CommitMsgShellHook�Hook�PostCommitShellHook�PostReceiveShellHook�PreCommitShellHook)�BlobNormalizer�TreeBlobNormalizer)�DiskObjectStore�MemoryObjectStore�MissingObjectFinder�ObjectStoreGraphWalker�PackBasedObjectStore�peel_sha)�Blob�Commit�ObjectID�ShaFile�Tag�Tree�check_hexsha�valid_hexsha)�generate_unpacked_objects)�ANNOTATED_TAG_SUFFIX�LOCAL_BRANCH_PREFIX�LOCAL_TAG_PREFIX�SYMREF�DictRefsContainer�DiskRefsContainer�InfoRefsContainer�Ref�
RefsContainer�_set_default_branch�	_set_head�_set_origin_head�check_ref_format�read_packed_refs�read_packed_refs_with_peeled�serialize_refs�write_packed_refsz.git�objects�refs�tags�heads�index�	commondir�gitdir�	worktrees�branches�hooks�infosmasterc�"�\rSrSrSrSSjrSrg)�InvalidUserIdentity�z2User identity is not of the format 'user <email>'.Nc��Xlg�N��identity)�selfrSs  �./usr/lib/python3/dist-packages/dulwich/repo.py�__init__�InvalidUserIdentity.__init__�s�� �
�rR��returnN��__name__�
__module__�__qualname__�__firstlineno__�__doc__rV�__static_attributes__�rXrUrNrN�s
��<�!rXrNc��\rSrSrSrSrg)�DefaultIdentityNotFound�z)Default identity could not be determined.rbN)r\r]r^r_r`rarbrXrUrdrd�s��3rXrdrZc�N�SSKnSH+n[RRU5nU(dM+ O SnSSKnUR[R"55n[USS5(aURRS5SnOSnUcURnU(dUc[S5eUn[RRS5nUc#Uc[S5eUSUR53nXV4$![a SnNmf=f![a SnNf=f)Nr)�LOGNAME�USER�LNAME�USERNAME�gecos�,zno username found�EMAIL�@)�socket�os�environ�get�pwd�getpwuid�getuid�getattr�pw_gecos�split�pw_name�KeyError�ImportErrorrd�gethostname)ro�name�usernamers�entry�fullname�emails       rU�_get_default_identityr��s ���8���:�:�>�>�$�'���8��9�
��)��
	)��L�L�����-�E��u�g�t�,�,� �>�>�/�/��4�Q�7������ �=�=�����)�*=�>�>����J�J�N�N�7�#�E��}���)�*=�>�>��*�A�f�0�0�2�3�4������%�	��H�	�������s"�D�$D�D�D�D$�#D$�configr�kindc�|�SnSnU(ar[RRSU-S-5nUbURS5n[RRSU-S-5nUbURS5nUcURSS5nUcURSS5n[5upgUcURS5nUcURS5nUR
S	5(aURS
5(aUSSnUS
-U-S
-$![a SnN�f=f![a SnN�f=f)a)Determine the identity to use for new commits.

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

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

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

Args:
  kind: Optional kind to return identity for,
    usually either "AUTHOR" or "COMMITTER".

Returns:
  A user identity
N�GIT_�_NAMEzutf-8�_EMAIL)�userr}r��<�>r���� <)rprqrr�encoderzr��
startswith�endswith)r�r�r�r��user_uc�email_uc�default_user�
default_emails        rU�get_user_identityr��sE��*!�D�!�E���*�*�.�.��$���!8�9�����>�>�'�*�D��:�:�>�>�&�4�-�(�":�;�����O�O�G�,�E��|�	��:�:�i��0�D�
�}�	��J�J�y�'�2�E�#8�"9��L��|��"�"�7�+���}��$�$�W�-��������%�.�.��"6�"6��a�����%�<�%��$�&�&���	��D�	��
�	��E�	�s$�D�D,�D)�(D)�,D;�:D;c��URSS5upSU;a[U5eSU;dSU;a[U5eg![an[U5UeSnAff=f)z�Verify that a user identity is formatted correctly.

Args:
  identity: User identity bytestring
Raises:
  InvalidUserIdentity: Raised when identity is invalid
r�rNr���
)rx�
ValueErrorrN)rS�fst�snd�excs    rU�check_user_identityr��sk��5��>�>�%��+����3��!�(�+�+����E�X�-�!�(�+�+�.��	�5�!�(�+��4��5�s�?�
A�	A�A�graftpointsc���0nUH[nURSS5nUSn[U5S:XaUSR5nO/nU/UQHn[US5 M XQU'M] U$)aConvert a list of graftpoints into a dict.

Args:
  graftpoints: Iterator of graftpoint lines

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

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

https://git.wiki.kernel.org/index.php/GraftPoint
Nrr��Invalid graftpoint)rx�lenr.)r��grafts�line�	raw_graft�commit�parents�shas       rU�parse_graftpointsr��s|�� �F����J�J�t�Q�'�	��1����y�>�Q����l�(�(�*�G��G��%�W�%�C���2�3�&�!�v����MrXc���/nUR5HEup#U(a(URUS-SRU5-5 M4URU5 MG SRU5$)z�Convert a dictionary of grafts into string.

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

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

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

� r�)�items�append�join)r��graft_linesr�r�s    rU�serialize_graftpointsr�s`���K�&�,�,�.�������v��}�t�y�y��/A�A�B����v�&�	/�
�:�:�k�"�"rXc��[RS:XaxSSKnSSKJnJnJn SnURX$U5"SURR45n[U[5(a[R"U5nU"X5(dggg)z�Mark path as to be hidden if supported by platform and filesystem.

On win32 uses SetFileAttributesW api:
<https://docs.microsoft.com/windows/desktop/api/fileapi/nf-fileapi-setfileattributesw>
�win32rN)�BOOL�DWORD�LPCWSTRr��SetFileAttributesW)�sys�platform�ctypes�ctypes.wintypesr�r�r��WINFUNCTYPE�windll�kernel32�
isinstance�bytesrp�fsdecode)�pathr�r�r�r��FILE_ATTRIBUTE_HIDDENr�s       rU�_set_filesystem_hiddenr�4s~���|�|�w���8�8� !��#�/�/��u�E�
!�6�=�=�#9�#9�:�
���d�E�"�"��;�;�t�$�D�!�$�>�>��?�rXc�0�\rSrSr0/4SSjjrSSjrSrg)�ParentsProvideriKNc�<�XlX l[U5UlgrQ)�storer��set�shallows)rTr�r�r�s    rUrV�ParentsProvider.__init__Ls���
����H�
��
rXc��URU$![a Of=fXR;a/$UcURUnUR$rQ)r�rzr�r�r�)rT�	commit_idr�s   rU�get_parents�ParentsProvider.get_parentsQsT��	��;�;�y�)�)���	��	���
�
�%��I��>��Z�Z�	�*�F��~�~�s��
�)r�r�r�rYrQ)r\r]r^r_rVr�rarbrXrUr�r�Ks��%'�"�&�
	rXr�c��\rSrSrSrS\S\SS4SjrS\4Sjr	S\4S	jr
SIS
\S\\SS4SjjrS
\
S\\4SjrS
\
S\SS4SjrS
\
SS4SjrSJSjrSKSjrSLSjrSLS\\4SjjrSLS\\S\\S\\\
/S4S\\4SjjrSIS\\\S\4SjjrS\\\44SjrS\4Sjr Sr!S \S\"4S!jr#S\$4S"jr%SIS \S#\\&S\\4S$jjr'SMS%jr(SMS&jr)S\\
4S'jr*SNS(jr+SOS*jr,S\-\4S+jr.SNS,jr/S-\0S\4S.jr1SIS/\\\4S0jjr2S1\3\\044S2jr4S1\S\4S3jr5S1\S4\3\"\4SS4S5jr6S1\SS4S6jr7SIS7S)S8\\
S\4S9jjr8S:\\\\4SS4S;jr9/4S<\\SS4S=jjr:S>r;SPS?\\S@\\SA\\SB\\SC\\S-\0SD\\\SE\SF\4SGjjr<SHr=g)Q�BaseRepoi]aKBase class for a git repository.

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

Attributes:
  object_store: Dictionary-like object for accessing
    the objects
  refs: Dictionary-like object with the refs in this
    repository
�object_storerCrZNc�8�XlX l0Ul0Ulg)z�Open a repository.

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

Args:
  object_store: Object store to use
  refs: Refs container to use
N)r�rC�_graftpointsrK)rTr�rCs   rUrV�BaseRepo.__init__js��)���	�68���&(��
rXc�,�[UR5e)��Probe the file-system to determine whether permissions can be trusted.

Returns: True if permissions can be trusted, False otherwise.
)�NotImplementedError�_determine_file_mode�rTs rUr��BaseRepo._determine_file_modezs��
"�$�";�";�<�<rXc�(�[RS:g$�zProbe the filesystem to determine whether symlinks can be created.

Returns: True if symlinks can be created, False otherwise.
r��r�r�r�s rU�_determine_symlinks�BaseRepo._determine_symlinks�����|�|�w�&�&rX�bare�symlinksc�f�SSKJn URSS5 [5nU"5nUR	SSS5 UR5(aUR	SSS	5 OUR	SSS
5 UcU(dUR
5nUS
LaUR	SSU5 UR	SS
U5 UR	SSS	5 URU5 URSUR55 UR[RRSS5S5 g)z(Initialize a default set of named files.r�r
�descriptionsUnnamed repository�core�repositoryformatversion�0�filemodeTFNr�r��logallrefupdatesr�rL�excluderX)r�r
�_put_named_filerr�r�r��
write_to_file�getvaluerpr�r�)rTr�r�r
�f�cfs      rU�_init_files�BaseRepo._init_files�s���&����]�,A�B��I��
�\��
���v�0�#�6��$�$�&�&��F�F�6�:�t�,��F�F�6�:�u�-���D��/�/�1�H��u���F�F�6�:�x�0�
���v�v�t�$�
���v�)�4�0�
��������X�q�z�z�|�4����R�W�W�\�\�&�)�<�c�BrXr�c�,�[UR5e)alGet a file from the control dir with a specific name.

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

Args:
  path: The path to the file, relative to the control dir.
Returns: An open file object, or None if the file does not exist.
)r��get_named_file�rTr�s  rUr��BaseRepo.get_named_file�s��"�$�"5�"5�6�6rX�contentsc�,�[UR5e)��Write a file to the control dir with the given name and contents.

Args:
  path: The path to the file, relative to the control dir.
  contents: A string to write to the file.
)r�r��rTr�r�s   rUr��BaseRepo._put_named_file�s��"�$�"6�"6�7�7rXc�,�[UR5e)z;Delete a file in the control directory with the given name.)r��_del_named_filer�s  rUr��BaseRepo._del_named_file�s��!�$�"6�"6�7�7rXc�,�[UR5e)�tOpen the index for this repository.

Raises:
  NoIndexPresent: If no index is present
Returns: The matching `Index`
)r��
open_indexr�s rUr�BaseRepo.open_index�s��"�$�/�/�2�2rXc���UcURRnURUUR5UUS9upVURR	XVU5 UR5$)z�Fetch objects into another repository.

Args:
  target: The target repository
  determine_wants: Optional function to determine what refs to
    fetch.
  progress: Optional progress function
  depth: Optional shallow fetch depth
Returns: The local refs
)�progress�depth)r��determine_wants_all�fetch_pack_data�get_graph_walker�
add_pack_data�get_refs)rT�target�determine_wantsrr�count�	pack_datas       rU�fetch�BaseRepo.fetch�sl���"�$�1�1�E�E�O��/�/���#�#�%���	0�
���	���)�)�%�H�E��}�}��rXc��URXX4US9nUR5n[U5n[U5[	UR
X�US94$)aVFetch the pack data required for a set of revisions.

Args:
  determine_wants: Function that takes a dictionary with heads
    and returns the list of heads to fetch.
  graph_walker: Object that can iterate over the list of revisions
    to fetch and has an "ack" method that will be called to acknowledge
    that a revision is present.
  progress: Simple progress function that will be called with
    updated progress strings.
  get_tagged: Function that returns a dict of pointed-to sha ->
    tag sha for including tags.
  depth: Shallow fetch depth
Returns: count and iterator over pack data
�r)r�other_haves)�find_missing_objects�get_remote_has�listr�r0r�)	rTr�graph_walkerr�
get_taggedr�missing_objects�
remote_has�
object_idss	         rUr�BaseRepo.fetch_pack_data�s`��.�3�3��8�u�4�
��%�3�3�5�
��/�*�
��:�� 9����z�*�!
�
�	
rXc
�6^
�US;a[S5e[URUR55nU"U5n[	U[
5(d[
S5e[US[55n[US[55n	U/:Xa U(dU	(ag"SS5n
U
"5$URRU5nU(dU	(a/n[URUS	9m
U
4S
jn[URUUUR5UUUS9$)ajFetch the missing objects required for a set of revisions.

Args:
  determine_wants: Function that takes a dictionary with heads
    and returns the list of heads to fetch.
  graph_walker: Object that can iterate over the list of revisions
    to fetch and has an "ack" method that will be called to acknowledge
    that a revision is present.
  progress: Simple progress function that will be called with
    updated progress strings.
  get_tagged: Function that returns a dict of pointed-to sha ->
    tag sha for including tags.
  depth: Shallow fetch depth
Returns: iterator over objects, with __len__ implemented
�Nrzdepth not supported yetz'determine_wants() did not return a list�shallow�	unshallowNc�2�\rSrSrSSjrS\4SjrSrSrg)	�?BaseRepo.find_missing_objects.<locals>.DummyMissingObjectFinderi(rZNc��grQrbr�s rUr�NBaseRepo.find_missing_objects.<locals>.DummyMissingObjectFinder.get_remote_has)s��rXc��grrbr�s rU�__len__�GBaseRepo.find_missing_objects.<locals>.DummyMissingObjectFinder.__len__,s��rXc3�$# �/Shv�N gN7frQrbr�s rU�__iter__�HBaseRepo.find_missing_objects.<locals>.DummyMissingObjectFinder.__iter__/s���!�M�M�s���rbrY)	r\r]r^r_r�intr&r)rarbrXrU�DummyMissingObjectFinderr"(s�� ��S��"rXr,)r�c�<>�TRURU5$rQ�r��id)r��parents_providers �rUr��2BaseRepo.find_missing_objects.<locals>.get_parentsBs���#�/�/��	�	�6�B�BrX)�haves�wantsrrrr�)
r�r@r�r
r�r�	TypeErrorrv�	frozenset�find_common_revisionsr�r$�get_shallow)rTrrrrrrCr3r��
unshallowsr,r2r�r0s             @rUr�BaseRepo.find_missing_objects�s���.�	�!�%�&?�@�@��d�/�/�����A����%���%��&�&��E�F�F�(/��i���(U��*1��+�y�{�+
�
��B�;��:��
"�
"�,�-�-�
�!�!�7�7��E���z��E�*�4�+<�+<�x�P��	C�#�������$�$�&��!�#�
�	
rX�have�wantr�	ofs_deltac�X�URRUUUR5UUS9$)a	Generate pack data objects for a set of wants/haves.

Args:
  have: List of SHA1s of objects that should not be sent
  want: List of SHA1s of objects that should be sent
  ofs_delta: Whether OFS deltas can be included
  progress: Optional progress reporting method
)rrr<)r��generate_pack_datar7)rTr:r;rr<s     rUr>�BaseRepo.generate_pack_dataOs:��� � �3�3����$�$�&���4�
�	
rXrEc��UcJURRS5R5Vs/sHnX R;dMUPM nn[	UR5n[XRUR5S9$s snf)z�Retrieve a graph walker.

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

Args:
  heads: Repository heads to use (optional)
Returns: A graph walker object
�
refs/heads)r)rC�as_dict�valuesr�r�r%r�r7)rTrEr�r0s    rUr�BaseRepo.get_graph_walkerfs����=� �9�9�,�,�]�;�B�B�D��D�C��+�+�+��D�
��
+�4�+<�+<�=��%��/�/��9I�9I�9K�
�	
��
s�B�Bc�6�URR5$)zNGet dictionary with all refs.

Returns: A ``dict`` mapping ref names to SHA1s
)rCrBr�s rUr
�BaseRepo.get_refs}s��
�y�y� � �"�"rXc� �URS$)z#Return the SHA1 pointed at by HEAD.�HEAD)rCr�s rU�head�
BaseRepo.head�s���y�y��!�!rXc�X�[U5S;deURU5n[X25(dwU[La[	U5eU[
La[
U5eU[La[U5eU[La[U5e[SUR<SUR<35eU$)N���(zType invalid: z != )
r��
get_objectr�r)rr(rr-rr,r�	Exception�	type_name)rTr��cls�rets    rU�_get_object�BaseRepo._get_object�s����3�x�8�#�#�#��o�o�c�"���#�#�#��f�}�$�S�)�)����"�3�'�'����"�3�'�'����!�#�&�&��.����0A��c�m�m�EV� W�X�X��
rXr�c� �URU$)z�Retrieve the object with the specified SHA.

Args:
  sha: SHA to retrieve
Returns: A ShaFile object
Raises:
  KeyError: when the object can not be found
)r�)rTr�s  rUrO�BaseRepo.get_object�s��� � ��%�%rXc�\�[URURUR5S9$)N)r�r�)r�r�r�r7r�s rUr0�BaseRepo.parents_provider�s-�������$�$��%�%�'�
�	
rXr�c�@�UR5RX5$)aRetrieve the parents of a specific commit.

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

Args:
  sha: SHA of the commit for which to retrieve the parents
  commit: Optional commit matching the sha
Returns: List of parents
)r0r�)rTr�r�s   rUr��BaseRepo.get_parents�s���$�$�&�2�2�3�?�?rXc�,�[UR5e)�XRetrieve the config object.

Returns: `ConfigFile` object for the ``.git/config`` file.
)r��
get_configr�s rUr^�BaseRepo.get_config�s��
"�$�/�/�2�2rXc�,�[UR5e)z$Retrieve the worktree config object.)r��get_worktree_configr�s rUra�BaseRepo.get_worktree_config�s��!�$�":�":�;�;rXc�,�[UR5e)z~Retrieve the description for this repository.

Returns: String with the description of the repository
    as set by the user.
)r��get_descriptionr�s rUrd�BaseRepo.get_description����"�$�"6�"6�7�7rXc�,�[UR5e)�oSet the description for this repository.

Args:
  description: Text to set as description for this repository.
)r��set_description�rTr�s  rUri�BaseRepo.set_description�rfrXrc���SSKJnJn UR5nU/nUR	SSS5(aURUR
55 XBR"5-
nU"XCS9$)z�Return a config stack for this repository.

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

Returns: `Config` instance for this repository
rr�s
extensions�worktreeconfigF)�writable)r�r
rr^�get_booleanr�ra�default_backends)rTr
r�local_config�backendss     rU�get_config_stack�BaseRepo.get_config_stack�sb��	6����(��&2�^���#�#�$4�6G��O�O��O�O�D�4�4�6�7��2�2�4�4���X�=�=rXc���URS5nUc
[5$U UVs1sHo"R5iM snsSSS5 $s snf!,(df   g=f)zBGet the set of shallow commits.

Returns: Set of shallow commits.
rN)r�r��strip)rTr�r�s   rUr7�BaseRepo.get_shallow�sK��

���	�*���9��5�L�
�-.�/�Q�T�J�J�L�Q�/��Q��/��Q�s�A�A�A�A�
Ac
�(�UR5nU(aURU5 U(aURU5 U(a5URSSR	UVs/sHoDS-PM	 sn55 gURS5 gs snf)z�Update the list of shallow objects.

Args:
  new_shallow: Newly shallow objects
  new_unshallow: Newly no longer shallow objects
rrXr�N)r7�update�difference_updater�r�r�)rT�new_shallow�
new_unshallowrr�s     rU�update_shallow�BaseRepo.update_shallow�ss���"�"�$����N�N�;�'���%�%�m�4��� � ��C�H�H�W�5U�W�c�E�k�W�5U�,V�W�� � ��+��6Vs�#B�refc��URRU5nUbU$[URURU5SR$)z�Get the peeled value of a ref.

Args:
  ref: The refname to peel.
Returns: The fully-peeled SHA1 of a tag object, after peeling all
    intermediate tags; if the original ref does not point to a tag,
    this will equal the original SHA1.
r)rC�
get_peeledr'r�r/)rTr��cacheds   rUr��BaseRepo.get_peeledsI�����%�%�c�*�����M���)�)�4�9�9�S�>�:�1�=�@�@�@rX�includec�x^�SSKJn UcTR5/nU4SjUS'U"TRU/UQ70UD6$)a�Obtain a walker for this repository.

Args:
  include: Iterable of SHAs of commits to include along with their
    ancestors. Defaults to [HEAD]
  exclude: Iterable of SHAs of commits to exclude along with their
    ancestors, overriding includes.
  order: ORDER_* constant specifying the order of results.
    Anything other than ORDER_DATE may result in O(n) memory usage.
  reverse: If True, reverse the order of output, requiring O(n)
    memory.
  max_entries: The maximum number of entries to yield, or None for
    no limit.
  paths: Iterable of file or subtree paths to show entries for.
  rename_detector: diff.RenameDetector object for detecting
    renames.
  follow: If True, follow path across renames/copies. Forces a
    default rename_detector.
  since: Timestamp to list commits after.
  until: Timestamp to list commits before.
  queue_cls: A class to use for a queue of commits, supporting the
    iterator protocol. The constructor takes a single argument, the
    Walker.
Returns: A `Walker` object
r)�Walkerc�<>�TRURU5$rQr.)r�rTs �rU�<lambda>�%BaseRepo.get_walker.<locals>.<lambda>.s���t�/?�/?��	�	�6�/RrXr�)�walkr�rIr�)rTr��args�kwargsr�s`    rU�
get_walker�BaseRepo.get_walkersA���4	!��?��y�y�{�m�G� R��}���d�'�'��B�4�B�6�B�BrXr}c�P�[U[5(d"[S[U5RS35e[U5S;aURU$URURU$![[4a N/f=f![an[U5UeSnAff=f)z�Retrieve a Git object by SHA1 or ref.

Args:
  name: A Git object SHA1 or a ref name
Returns: A `ShaFile` object, such as a Commit or Blob
Raises:
  KeyError: when the specified ref or object does not exist
z'name' must be bytestring, not z.80rLN)r�r�r4�typer\r�r�rzr�rCr)rTr}r�s   rU�__getitem__�BaseRepo.__getitem__2s����$��&�&��=�d�4�j�>Q�>Q�RU�=V�W�X�X��t�9�� �
��(�(��.�.�	*��$�$�T�Y�Y�t�_�5�5���j�)�
��
���	*��4�.�c�)��	*�s*�A4�B
�4B�B�

B%�B � B%c��[U5S:Xd[U5S:Xa3[U5(a#XR;=(d XR;$XR;$)z]Check if a specific Git object or ref is present.

Args:
  name: Git object SHA1 or ref name
rMrN)r�r/r�rC�rTr}s  rU�__contains__�BaseRepo.__contains__GsK���t�9��?�s�4�y�B��<��3E�3E��,�,�,�A��	�	�0A�A��9�9�$�$rX�valuec��URS5(dUS:Xa^[U[5(aURURU'g[U[
5(aX RU'g[
U5e[U5e)z^Set a ref.

Args:
  name: ref name
  value: Ref value - either a ShaFile object, or a hex sha
�refs/rHN)r�r�r+r/rCr�r4r�)rTr}r�s   rU�__setitem__�BaseRepo.__setitem__Rse���?�?�8�$�$�����%��)�)�"'�(�(��	�	�$���E�5�)�)�"'�	�	�$����&�&��T�"�"rXc�l�URS5(dUS:XaURU	g[U5e)z7Remove a ref.

Args:
  name: Name of the ref to remove
r�rHN)r�rCr�r�s  rU�__delitem__�BaseRepo.__delitem__cs/���?�?�8�$�$�����	�	�$���T�"�"rXr�r�c�N�[R"S[5 [U5$)z.Determine the identity to use for new commits.z;use get_user_identity() rather than Repo._get_user_identity)�warnings�warn�DeprecationWarningr�)rTr�r�s   rU�_get_user_identity�BaseRepo._get_user_identityns#��	�
�
�I��	
�!��(�(rX�updated_graftpointsc��UR5Hup#U/UQHn[US5 M M URRU5 g)zdAdd or modify graftpoints.

Args:
  updated_graftpoints: Dict of commit shas to list of parent shas
r�N)r�r.r�rz)rTr�r�r�r�s     rU�_add_graftpoints�BaseRepo._add_graftpointsxsM�� 3�8�8�:�O�F��)��)���S�"6�7�*� ;�	
��� � �!4�5rX�	to_removec�0�UHnURU	M g)z<Remove graftpoints.

Args:
  to_remove: List of commit shas
N)r�)rTr�r�s   rU�_remove_graftpoints�BaseRepo._remove_graftpoints�s���C��!�!�#�&�rXc��URU5nUc/$U UR5Vs/sH)o3R5(dMUR5PM+ snsSSS5 $s snf!,(df   g=frQ)r��	readlinesrw)rTr}r�r�s    rU�_read_heads�BaseRepo._read_heads�sW������%���9��I�
�-.�[�[�]�K�]�T�j�j�l�L�D�J�J�L�]�K��Q��K��Q�s"�A-�A(�A(�A-�(A-�-
A;�message�	committer�author�tree�encoding�merge_heads�	no_verify�signc
��U(dURSR5 [5nUc1UR
5nURUR5Ul	O [U5S:wa[S5eX�l	UR5nUcURS5nUc
[USS9n[U5 X/lUc["R""5n[%U5UlUcSnX_lUc
[US	S9nX?l[U5 UcUn[%U5UlUcUnXlU	cUR1S
S5n	U	bX�lUc[S5eU(aXlO6URS
RU5UlUR4cXl[7U
[85(aU
OSnU
c:X�lU
(aUR=U5 URR?U5 O�UR@U
nU/UQUlU
(aUR=U5 URR?U5 UR@RCU
UURDSU-UUUS9nU(d[U
<S35eURIS5 URSR5 URD$![an[U5UeSnAf[a GN�f=f![a GN�f=f![an[U5UeSnAf[a
 XlGN�f=f![ah X�lU
(aUR=U5 URR?U5 UR@RGU
URDSU-UUUS9nGN-f=f![a3n[JRL"SU3[N5 SnAURD$SnAf[a URD$f=f)a�Create a new commit.

If not specified, committer and author default to
get_user_identity(..., 'COMMITTER')
and get_user_identity(..., 'AUTHOR') respectively.

Args:
  message: Commit message
  committer: Committer fullname
  author: Author fullname
  commit_timestamp: Commit timestamp (defaults to now)
  commit_timezone: Commit timestamp timezone (defaults to GMT)
  author_timestamp: Author timestamp (defaults to commit
    timestamp)
  author_timezone: Author timestamp timezone
    (defaults to commit timestamp timezone)
  tree: SHA1 of the tree root to use (if not specified the
    current index will be committed).
  encoding: Encoding
  ref: Optional ref to commit to (defaults to current branch)
  merge_heads: Merge heads (defaults to .git/MERGE_HEAD)
  no_verify: Skip pre-commit and commit-msg hooks
  sign: GPG Sign the commit (bool, defaults to False,
    pass True to use default GPG key,
    pass a str containing Key ID to use a specific GPG key)

Returns:
  New commit SHA1
�
pre-commitNrNz%tree must be a 40-byte hex sha string�
MERGE_HEAD�	COMMITTER)r�r�AUTHOR)�i18n�commitEncodingzNo commit message specified�
commit-msgscommit: )r�r��	timestamp�timezonez changed during commit�post-commitzpost-commit hook failed: )(rK�executerrrzr)rr�r�r�r�r�rtr�r�r�r��timer+�commit_time�commit_timezoner��author_time�author_timezonerrr�r�r��strr�r��
add_objectrC�
set_if_equalsr/�
add_if_newr�r�r��UserWarning)rTr�r�r��commit_timestampr��author_timestampr�r�r�r�r�r�r�r��crFr��keyid�old_head�ok�es                      rU�	do_commit�BaseRepo.do_commit�s���Z	���
�
�<�(�0�0�2�
�H���<��O�O�%�E��\�\�$�"3�"3�4�A�F��4�y�B�� �!H�I�I��F��&�&�(�����*�*�<�8�K���)�&�{�C�I��I�&����#�#�y�y�{���,�-��
��"��O�+���>�&�v�H�=�F����F�#��#�/���,�-��
��"�-�O�+����
�!�:�:�i�1A�B����!�J��?��:�;�;�
	 ��#�	� �J�J�|�4�<�<�W�E��	��9�9�$� '�I�#�4��-�-��4���;�#�I�����u�
����(�(��+�
��9�9�S�>��%�4��4��	���F�F�5�M��!�!�,�,�Q�/��Y�Y�,�,����D�D�'�'�1�'�.�,�-���,�"�S�G�+A�"B�C�C����\�*�	��J�J�}�%�-�-�/��t�t���e�	,��c�"��+���	��	��R�
��
���	,��c�"��+���	 ��I�	 ��6�
�'�	���F�F�5�M��!�!�,�,�Q�/��Y�Y�)�)���D�D�'�'�1�'�.�,�
*���
��,�	H��M�M�5�a�S�9�;�G�G��t�t����	���t�t��	�s��$K	�;K3�%
L�36L�A8L4� N)�	
K0�K�
K0�/K0�3
L�L�
L1�L�L1�0L1�4A.N&�%N&�)
O<�3O!�!
O<�;O<)r�rKr�rCrQ�rZr)NNN�NN�rZr
rY)rZr)
NNNNNNNNNrHNFF)>r\r]r^r_r`r&r9rV�boolr�r�r	r�r�rr�r�r�r�rrrr$rrr*rr>r%r�dictr
rIrTr+rOr�r0r)r�r^rardrirtr�r7r~r8r�r�r
r�r�r�r�r�r�r�r�r�rarbrXrUr�r�]s���
�)�%9�)��)�SW�)� =�d�=�'�T�'�C��C����C�$�C�27�3�7�8�H�+=�7�8�C�8�5�8�T�8�8�C�8�D�8�3��6��

�J��
R
�
�%�	&�R
�p59�$(�
��8�n�
��8�n�
��8�S�E�4�K�0�1�	
�
�D�>�
�015�
��d�8�n�-�
�	�
�.#�$�u�e�|�,�#�"�e�"�� 	&�e�	&��	&�
�/�
�@�u�@�h�v�.>�@�$�u�+�@�3�<�8��#��8�8�>�&	0�S��]�	0�,�"A�c�A�h�A�!C�(�4��;�"7�!C�F*��h��m� 4�*�*	%��	%�4�	%�#��#�e�G�U�N�.C�#��#�"	#��	#�$�	#�>B�)�%�)�-5�c�]�)�	�)�6�D���U��9K�4L�6�QU�6�<>�'�T�%�[�'�$�'�L�$(�%)�"&�����#'�$(��04���b��%��b��E�?�b����	b��x� �b��5�/�b��b��d�8�n�-�b��b��b�brXr�c��UR5nURS5(d[S5eU[S5SR	S5$)z�Read a ``.git`` file.

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

Args:
  f: File-like object to read from
Returns: A path
zgitdir: z&Expected file to start with 'gitdir: 'N�
)�readr�r�r��rstrip)r��css  rU�read_gitfiler�:sG��
����B�
�=�=��$�$��A�B�B�
�c�*�o�� �'�'��-�-rXc�"�\rSrSrSrSSjrSrg)�UnsupportedVersioniIzUnsupported repository version.Nc��XlgrQ��version)rTr�s  rUrV�UnsupportedVersion.__init__Ls���rXr�rYr[rbrXrUr�r�Is
��)�rXr�c�"�\rSrSrSrSSjrSrg)�UnsupportedExtensioniPz!Unsupported repository extension.Nc��XlgrQ��	extension)rTr�s  rUrV�UnsupportedExtension.__init__Ss��"�rXr�rYr[rbrXrUr�r�Ps
��+�#rXr�c
�d�\rSrSr%Sr\\S'\\S'S2S\S\\	S\\SS4S	jjr
S3S
jr\S4Sj5r
SrS
rSrSrS3SjrS3SjrS5SjrSrS6SjrS\4SjrS\\\\R6\\\\\R644SS4SjrS\\SS4SjrSSSSSSSSS.S7Sjjr S5S\\4Sjjr!S8S jr"S8S!jr#S"r$S\4S#jr%S3S$jr&\S9S%\\4S&jj5r'\SSSSS'.S\S(\S%\\SS4S)jj5r(\S:S*j5r)\SSSSS+.S,j5r*\*r+S3S-jr,S.r-S/r.S0r/S1r0g);�RepoiWa�A git repository backed by local disk.

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

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

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

Attributes:
  path: Path to the working copy (if it exists) or repository control
    directory (if the repository is bare)
  bare: Whether this is a bare repository
r�r�N�rootr�rZc
�x
�[RRU[5nUGc[RR	U5(dF[RR[RRU[55(aSnO�[RR[RRU[55(aI[RR[RRU[55(aSnO"[SR"S0[US9D65eX0lUSLap[RR	U5(aE[U5n[U5nSSS5 [RRUW5UlO
X@lOXlUR[ 5nUbpU [RRUR#5[R$"UR'5R)S555UlSSS5 OURUlXlUR-5nUR/SS5n	U	cSO
[1U	5n
U
S	;a[5U
5eUR7S
5H$up�UR95S;dM5e UcG[<R>"[RRURA5[5U5n[CURA5URURDS9n
[FRIXU
5 0Ul%UR[RRS
S5URA5S9nU(a/U URJRM[OU55 SSS5 URSURA5S9nU(a/U URJRM[OU55 SSS5 [QURUR#55URRS'[UUR#55URRS'[WUR#55URRS'[YUR#55URRS'g!,(df   GN\=f!,(df   GN�=f![2a Sn
GN{f=f!,(df   GN>=f!,(df   N�=f)NFT�%No git repository was found at {path}�r�s
r�r�r)rrrm)rn��loggerrLr�)�basedirrr�r�r�zpost-receiverb)-rpr�r��
CONTROLDIR�isfile�isdir�	OBJECTDIR�REFSDIRr�formatr�r��openr��_controldirr��	COMMONDIR�
controldirr�r�r��
_commondirr^rrr+rzr�r��lowerr�r"�from_configrGr6�
_write_reflogr�rVr�rzr�rrKrrr)rTr�r�r��hidden_pathr�r�rGr��repository_format_version�format_versionr��_valuerC�
graft_files               rUrV�
Repo.__init__ls����g�g�l�l�4��4���<��w�w�~�~�k�*�*�b�g�g�m�m������[�)�4�/�/��������r�w�w�|�|�D�)�<�=�=�"�'�'�-�-������T�7�+�C�C���&�;�B�B�U�T�t�_�U����	��5�=��w�w�~�~�k�*�*��+�&�!�'��?�D�'�#%�7�7�<�<��d�#;�� �#.� �#���'�'�	�2�	�� ��"$�'�'�,�,��O�O�%��K�K�	��� 0� 7� 7�� @�A�#�����#�.�.�D�O��	����"��	�(.�
�
�6�;T�(U�%�-�4���2�3�
���'�$�^�4�4�!'���.>�!?��I���� �(<�<�*�9�5�5�"@���*�6�6������T�^�^�-�y�9�6��L�!��N�N��d�.�.�t�7I�7I�
��	���$�d�3�����(�(��G�G�L�L���*�D�N�N�4D�)�
�
����!�!�(�(�):�:�)F�G���(�(��D�N�N�<L�(�M�
����!�!�(�(�):�:�)F�G��$6�d�i�i����AR�#S��
�
�<� �#5�d�o�o�6G�#H��
�
�<� �$7����8I�$J��
�
�=�!�%9�$�/�/�:K�%L��
�
�>�"�w'�&����� �	��N�	��0�����sC�S"�"A%S4�8"T�=%T�%T+�"
S1�4
T�T�T�
T(�+
T9c�@�SSKJn [RR	UR5S[R"U55n	[R"[RRU	55 UcUR5n
[U
5n[U5 Uc[[R"55nUcSn[U	S5nUR!U"X#XEXg5S-5 SSS5 g![a N�f=f!,(df   g=f)Nr)�format_reflog_line�logsr�abr�)�reflogrrpr�r�rr��makedirs�dirname�FileExistsErrorrtr�r�r+r�r��write)rTr��old_sha�new_shar�r�r�r�rr�r�r�s            rUr�Repo._write_reflog�s���	/��w�w�|�|�D�O�O�-�v�r�{�{�3�7G�H��	��K�K�������-�.����*�*�,�F�)�&�1�I��I�&����D�I�I�K�(�I����H�
�$��
��
�G�G�"��i�H����
��
���	��	���
�s�3C?�D�?
D�D�
Dc
��Sn[RRU5nU(a	U"U5$[SR
"S0[
US9D65e![a$ [RR	U5up2Of=fU(aMeN])z�Iterate parent directories to discover a repository.

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

Args:
  start: The directory to start discovery from (defaults to '.')
Tr�r�rb)rpr��abspathrrxr�r�)rR�start�	remainingr�s    rU�discover�
Repo.discover�s����	��w�w���u�%���
6��4�y� ��3�:�:�N�T�u�=M�N�
�	
��$�
6�"$�'�'�-�-��"5���i�
6���is�A�+B�Bc��UR$)z)Return the path of the control directory.)rr�s rUr�Repo.controldir�s�����rXc��UR$)z�Return the path of the common directory.

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

For a linked working tree, it is the control directory of the
main working tree.
)rr�s rUrG�Repo.commondir�s�����rXc�T�[RRURS5n[US5nUR	S5 SSS5 [R
"U5n[R"XR[R-5 [R
"U5n[R"U5 URUR:gnUR[R-S:gnU=(a U$!,(df   N�=f![a gf=f)r�z.probe-permissions�w�NFr)rpr�r�r�r�lstat�chmod�st_mode�stat�S_IXUSR�PermissionError�unlink)rT�fnamer��st1�st2�mode_differs�st2_has_execs       rUr��Repo._determine_file_mode�s���
�����T�Y�Y�(<�=��
�%��
��
�G�G�B�K���h�h�u�o��	��H�H�U�K�K�$�,�,�6�7��h�h�u�o��
�	�	�%���{�{�c�k�k�1�����d�l�l�2�q�8���,��,��
���	��	�s�D	�(1D�	
D�
D'�&D'c�(�[RS:g$r�r�r�s rUr��Repo._determine_symlinksr�rXc��UR[RR5n[	[RRUR
5U5S5nURU5 SSS5 g!,(df   g=f)r��wbN)�lstriprpr��seprr�rr)rTr�r�r�s    rUr��Repo._put_named_filesU���{�{�2�7�7�;�;�'��
�R�W�W�\�\�$�/�/�"3�T�:�D�
A�Q�
�G�G�H��B�
A�
A�s�"A=�=
Bc��[R"[RRUR	5U55 g![
a gf=frQ)rpr,r�r�r�FileNotFoundErrorr�s  rUr��Repo._del_named_file(s;��	��I�I�b�g�g�l�l�4�?�?�#4�d�;�<�� �	��	�s�AA�
A�Ac���UcUR5nUR[RR5n[[RR
X!5S5$![a gf=f)a�Get a file from the control dir with a specific name.

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

Args:
  path: The path to the file, relative to the control dir.
  basedir: Optional argument that specifies an alternative to the
    control dir.
Returns: An open file object, or None if the file does not exist.
N�rb)rr7rpr�r8r�r�r;)rTr�r�s   rUr��Repo.get_named_file.s\���?��o�o�'�G��{�{�2�7�7�;�;�'��	�������W�3�T�:�:�� �	��	�s�(A'�'
A4�3A4c�f�[RRUR5[5$)zReturn path to the index file.)rpr�r�r�INDEX_FILENAMEr�s rU�
index_path�Repo.index_pathEs���w�w�|�|�D�O�O�-�~�>�>rXc�p�SSKJn UR5(d[eU"UR	55$)rrr)rFr�	has_indexrrB)rTrs  rUr�Repo.open_indexIs,��	!��~�~��� � ��T�_�_�&�'�'rXc�$�UR(+$)zCheck if an index is present.�r�r�s rUrE�Repo.has_indexVs���9�9�}�rX�fs_pathsc���[R"UR5n[U[[
[R45(aU/n[U5nSSKJ	nJ
nJnJn UR5nUR5nUGHxn	[U	[
5(d[R"U	5n	[RRU	5(a[!SU	<S35eU"U	5n
[RR#X)5n[R$"U5n[&R("UR*5(aU"X�5n
U
(aX�U
'M�Xz	M�[&R."UR*5(d+[&R0"UR*5(dXz	GM0U"X�5nUR3X�5nUR4R7U5 U"X�R85Xz'GM{ UR=5 g![,a GM�f=f![,a GM�f=f![:a Xz	GM�![,a GM�f=ff=f)zXStage a set of paths.

Args:
  fs_paths: List of paths, relative to the repository path
r)�_fs_to_tree_path�blob_from_path_and_stat�index_entry_from_directory�index_entry_from_statzpath z4 should be relative to repository root, not absoluteN)rp�fsencoder�r�r�r��PathLikerrFrLrMrNrOr�get_blob_normalizer�isabsr�r�r&r)�S_ISDIRr(rz�S_ISREG�S_ISLNK�checkin_normalizer�r�r/�OSErrorr)rTrJ�root_path_bytesrLrMrNrOrF�blob_normalizer�fs_path�	tree_path�	full_path�str�blobs               rU�stage�
Repo.stage\s����+�+�d�i�i�0���h��e�R�[�[� 9�:�:� �z�H���>��	
�	
����!���2�2�4���G��g�u�-�-��+�+�g�.���w�w�}�}�W�%�%� ��G�;�'4�4���)��1�I������_�>�I�
J��X�X�i�(���<�<��
�
�+�+�6�r�E�E��+0�i�(�!� %� 0����b�j�j�1�1�$�,�,�r�z�z�:R�:R��!�,�3�9�A�D�*�<�<�T�K�D��%�%�0�0��6�'<�R���'I�E�$�K �L	���
�� (�!� �!��
$�����'�
���(�������	
�sN�H9�#H�2H'�
H$�#H$�'
H6�5H6�9
I�I
�

I�I�I�Ic��SSKJnJn UR5nUSRnUGH4nU"U5nURUn[U[5(deURURRU5n	Sn[R"[RR!URU55nU"USR$S4USR$S4U(aUR&OSU(aUR(OSU	SU(aUR*OSU(aUR,OS[/X	SR05U	SS9	nX�U'GM7 UR
5 g![
a& UH
nU"U5nXG	M UR
5 gf=f![
a8 XG	GM�![
a#n
[SUR5S35U
eSn
A
ff=ff=f!["a GN5f=f)	zvUnstage specific file in the index
Args:
  fs_paths: a list of files to unstage,
    relative to the repository path.
r)�
IndexEntryrLrHNzfile 'z' not in indexr)	�ctime�mtime�dev�ino�mode�uid�gid�sizer�)rFrcrLrr�rzrr�r�r-�lookup_pathr��decoderpr&r�r�r;r��st_dev�st_ino�st_uid�st_gidr��data)
rTrJrcrLrF�tree_idr[r\r��
tree_entryr�r^�index_entrys
             rU�unstage�Repo.unstage�s���	8����!��	��7�m�(�(�G� �G�(��1�I�
Y��(�(��1��!�$��-�-�-�-�!�-�-�d�.?�.?�.K�.K�Y�W�
��B�
��X�X�b�g�g�l�l�4�9�9�g�>�?��%��G�}�0�0�!�4��G�}�0�0�!�4�!#�B�I�I��!#�B�I�I����]�!#�B�I�I��!#�B�I�I�����m�,�1�1�2��q�M�
�K� +�)��C �D	���
��U�	�#��,�W�5�	��$�$�
�K�K�M��
	���
Y�Y��(����Y�"�V�I�,<�,<�,>�+?�~�#N�O�UX�X��Y��

Y��%�
��
�sM�E5�AF(�>G-�5-F%�$F%�(
G*�3F9�9
G&�G!�!G&�&G*�-
G;�:G;TFsorigin)�mkdirr��origin�checkout�branchrrr�c��[R"UR5n
U(a[R"U5 U(d[RXS9nUcSnO'U(a[
S5e[RU5nUR5nURSU4SU
5 URSU4SSU-S	-5 UR5 S
U
-n
URX�S9 URRSU-URRS
5U
S9 URRSURRS5U
S9 URRS5up�U(aUSOSnU(aU(dX�RS'OP[!URUU5 [#URUUXm5nU(a[%URUU
5nOSnU(aWbUR'5 U$![(a UR+5 ef=f![(a U(aSSKnUR/U5 ef=f)a+Clone this repository.

Args:
  target_path: Target path
  mkdir: Create the target directory
  bare: Whether to create a bare repository
  checkout: Whether or not to check-out HEAD after cloning
  origin: Base name for refs in target repository
    cloned from this repository
  branch: Optional branch or tag to be used as HEAD in the new repository
    instead of this repository's HEAD.
  progress: Optional progress function
  depth: Depth at which to fetch
  symlinks: Symlinks setting (default to autodetect)
Returns: Created repository as `Repo`
)r�NTz"checkout and bare are incompatiblesremotesurlsfetchs+refs/heads/*:refs/remotes/s/*sclone: from rs
refs/remotes/rA)r�s	refs/tagsrHr�r)rprPr�rxr��initr��	init_barer^r��
write_to_pathrrC�import_refsrB�followr<r:r;�reset_index�
BaseException�close�shutil�rmtree)rT�target_pathrxr�ryrzr{rrr��encoded_pathr�
target_config�ref_message�
head_chain�
origin_sha�origin_head�head_refrIr�s                    rU�clone�
Repo.clone�s��:�{�{�4�9�9�-����H�H�[�!�:	�����;��B���#�#�H���$�%I�J�J�����4��*
� &� 1� 1� 3�
��!�!�9�f�"5�v�|�L��!�!���'��2�V�;�e�C��
�+�+�-�-��<���
�
�6�
�/����'�'�$�v�-��I�I�%�%�m�4�'�(��
���'�'� �$�)�)�"3�"3�L�"A�;�(��*.���)9�)9�'�)B�&�
�0:�j��n����k�+5�K�K��(�$�V�[�[�&�+�F�2����V�[�&� �H�
 �(����h��L��#���� 0��&�&�(��
��!�
������
���	����
�
�k�*��	�s�AH)�FH
�
H&�&H)�)(Ir�c
�
�SSKJnJnJnJn UcEUSn[U[5(aURupxURU5nURnUR5n	U	RSS[RS:g5n
U	RSS[RS:H5(aUnOUnU	RSSS	5(aUnOSS
jnU"URUR5UR UU
UUS9$)
zjReset the index back to a specific tree.

Args:
  tree: Tree SHA to reset to, None for current HEAD tree.
r)�build_index_from_tree�symlink�validate_path_element_default�validate_path_element_ntfsrHscoresfilemode�ntscore.protectNTFSssymlinksTc��[US[U[5(aSOS-5nURU5 SSS5 g!,(df   g=f)Nr$�br%)r�r�r�r)�sourcerr�s   rU�
symlink_fn�$Repo.reset_index.<locals>.symlink_fnQs@����C�*�V�U�*C�*C�3��L����G�G�F�O����s�A�
A)�honor_filemode�validate_path_elementr�rY)rFr�r�r�r�r�r,�objectrOr�r^rprpr}r�rBr�)
rTr�r�r�r�r�rI�_cls�objr�r�r�r�s
             rUr��Repo.reset_index4s���	
�	
��<���=�D��$��$�$� �K�K�	�����s�+���9�9�D����"���+�+�G�[�"�'�'�T�/�R�����g�':�B�G�G�t�O�L�L�$>�!�$A�!����g�{�D�9�9� �J�
$�%��I�I��O�O������)�"7�!�
�	
rXc���SSKJn [RR	UR5S5nUR"U5$![a U"5nX#lUs$f=f)Nrr�zconfig.worktree)r�r
rpr�r�rG�	from_pathr;)rTr
r�r�s    rUra�Repo.get_worktree_configasW��&��w�w�|�|�D�N�N�,�.?�@��	��'�'��-�-�� �	���B��G��I�	�s�A�A$�#A$c���SSKJn [RR	UR
S5nUR"U5$![a U"5nX#lUs$f=f)r]rr�r�)r�r
rpr�r�rr�r;)rTr
r�rSs    rUr^�Repo.get_configlsU��
	'��w�w�|�|�D�O�O�X�6��	��'�'��-�-�� �	��,�C��H��J�	�s�A�A �A c���[RRURS5n[	US5nUR5sSSS5 $!,(df   g=f![a gf=f)zcRetrieve the description of this repository.

Returns: A string describing the repository or None.
r�r>N)rpr�r�rrr�r;)rTr�r�s   rUrd�Repo.get_description{sU��
�w�w�|�|�D�,�,�m�<��	���t�$���v�v�x�%�$�$�� �	��	�s.�A#�A�	A#�
A �A#� A#�#
A0�/A0c�$�SUR<S3$)Nz	<Repo at �>r�r�s rU�__repr__�
Repo.__repr__�s���4�9�9�-�q�)�)rXc�(�URSU5 g)rhr�N)r�rjs  rUri�Repo.set_description�s��	
���]�K�8rXr�c��[H8n[R"[RR"U/UQ765 M: Uc8[
R"[RR	U[55nU"XUS9n	Uc-UcSSKJ	n
 U
R"5nURSS5nU	RRS[ U-5 U	R#X7S9 U	$![a	 [nNFf=f)N)r�r�r)rr}�
defaultBranchrH)r�r�)�BASE_DIRECTORIESrprxr�r�r"r}r�r�r�defaultrrrz�DEFAULT_BRANCHrC�set_symbolic_refr2r�)rRr�rr�r�r��default_branchr��drSrs           rU�_init_maybe_bare�Repo._init_maybe_bare�s���"�A��H�H�R�W�W�\�\�*�1�q�1�2�"���*�/�/������Z��0S�T�L��$��=���!��~�1�&�.�.�0��
0�!'���F�O�!D��	���!�!�'�+>��+O�P����T��5��
��	�
0�!/��
0�s�#C)�)C<�;C<)rxr�r�r�rxc	���U(a[R"U5 [RRU[5n[R"U5 [U5 UR
UUSUUUS9$)z�Create a new repository.

Args:
  path: Path in which to create the repository
  mkdir: Whether to create the directory
Returns: `Repo` instance
F)r�r�r�)rprxr�r�r�r�r�)rRr�rxr�r�r�rs       rUr}�	Repo.init�sd��"��H�H�T�N��W�W�\�\�$�
�3�
�
������z�*��#�#�����)��
$�
�	
rXc�@�U(a[R"U5 Uc[RRU5n[RR	UR5[5n[RR	XS5n[RR	U[5n[US5nURS[R"U5-S-5 SSS5 [R"U5 [R"U5 [[RR	U[5S5nUR[R"U5S-5 SSS5 [[RR	U[5S5nURS5 SSS5 [[RR	US5S5nURUR5S-5 SSS5 U"U5n	U	R5 U	$!,(df   GNS=f![a GNLf=f![a GNFf=f!,(df   N�=f!,(df   N�=f!,(df   N~=f)z�Create a new working directory linked to a repository.

Args:
  path: Path in which to create the working tree.
  main_repo: Main repository to reference
  identifier: Worktree identifier
  mkdir: Whether to create the directory
Returns: `Repo` instance
Nr6sgitdir: r�s../..
�HEAD)rprxr��basenamer�r�	WORKTREESr�r�rrPr�GITDIRrrIr�)
rRr��	main_repo�
identifierrx�main_worktreesdir�worktree_controldir�
gitdirfiler��rs
          rU�_init_new_working_directory� Repo._init_new_working_directory�s�����H�H�T�N������)�)�$�/�J��G�G�L�L��)=�)=�)?��K�� �g�g�l�l�+<�I���W�W�\�\�$�
�3�
�
�*�d�
#�q�
�G�G�K�"�+�+�.A�"B�B�U�J�K�$�	��H�H�&�'�	��H�H�(�)��"�'�'�,�,�2�F�;�T�
B�a�
�G�G�B�K�K�
�+�e�3�4�C�
�"�'�'�,�,�2�I�>��
E��
�G�G�J��F�
�"�'�'�,�,�2�F�;�T�
B�a�
�G�G�I�N�N�$�u�,�-�C���I��	�
�
����%$�
#���	��	���	��	��
B�
B��
E�
E��
B�
B�sT�,H9�6I�
I�)I-�0I>�4#J�9
I�
I�I�
I*�)I*�-
I;�>
J�
J)rxr�r�r�c	�d�U(a[R"U5 URUUSUUUS9$)z�Create a new bare repository.

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

Args:
  path: Path to create bare repository in
Returns: a `Repo` instance
T)r�r�r�)rprxr�)rRr�rxr�r�r�s      rUr~�Repo.init_bare�s<����H�H�T�N��#�#����%��)�
$�
�	
rXc�8�URR5 g)z*Close any files opened by this repository.N)r�r�r�s rUr��
Repo.close
s�������!rXc��U$rQrbr�s rU�	__enter__�Repo.__enter__s���rXc�$�UR5 grQ)r�)rT�exc_type�exc_val�exc_tbs    rU�__exit__�
Repo.__exit__s���
�
�rXc���0nUR5nURURSRn[	UUURU5$![
a [
X!5s$f=f)zReturn a BlobNormalizer object.rH)rtr�rCr�r!rzr )rT�git_attributes�config_stackr�s    rUrR�Repo.get_blob_normalizersy�����,�,�.��		@��$�$�T�Y�Y�w�%7�8�=�=�D�%����!�!��	�
���	@�!�,�?�?�	@�s�=A�A*�)A*)rrr�r�r�r�rY)�.rQr�)rZr�r�)NNNN)NF)1r\r]r^r_r`r��__annotations__r�r	r&rVr�classmethodrrrGr�r�r�r�r�rBrrEr
r�rprQrr`rrvr�r�rar^rdr�rir�r}r�r~�creater�r�r�rRrarbrXrUr�r�Ws:���"�I�
�J�
8<�#�	SM��SM��3�4�SM��t�n�	SM�

�SM�j�	
��4�
��
�( ��-�.'�	���.?�(��4��@�������X�e�C�����4K�.L�%M�M�
�@�

�@�D5��S�	�5�d�5�v�
�������]�
�]�~+
����+
�Z	�
�
�*�#�*�9�����#'���4�.����8�
���#'�
��
��	
��4�.�
�
�
��
�<�#��#�J�!��T�RV�
��
�,�F�"���@rXr�c��\rSrSrSrSSjrSSjrSSjrSrSr	S	r
SS
jrSSjrSSjr
SS
jrSr\S5rSrg)�
MemoryRepoi(z�Repo that stores refs, objects, and named files in memory.

MemoryRepos are always bare: they have no working tree and no index, since
those have a stronger dependency on the filesystem.
Nc���SSKJn /Ul[0URS9n[
R
U[5U5 0UlSUl	U"5Ul
SUlg)Nrr�r�T)r�r
�_reflogr5�_append_reflogr�rVr#�_named_filesr��_config�_description)rTr
�refs_containers   rUrV�MemoryRepo.__init__/sT��&�"$���*�2�d�6I�6I�J�����$� 1� 3�^�D�.0�����	�!�|��� ��rXc�:�URRU5 grQ)r�r�)rTr�s  rUr��MemoryRepo._append_reflog:s�������D�!rXc��XlgrQ�r�rjs  rUri�MemoryRepo.set_description=s��'�rXc��UR$rQr�r�s rUrd�MemoryRepo.get_description@s��� � � rXc�(�[RS:g$�r�r�r�r�s rUr��MemoryRepo._determine_file_modeC���
�|�|�w�&�&rXc�(�[RS:g$r�r�r�s rUr��MemoryRepo._determine_symlinksJr�rXc� �X RU'g)r�N)r�r�s   rUr��MemoryRepo._put_named_fileQs��#+���$�rXc�@�URU	g![a gf=frQ)r�rzr�s  rUr��MemoryRepo._del_named_fileZs'��	��!�!�$�'���	��	�s�
�
�c�X�URRUS5nUcg[U5$)alGet a file from the control dir with a specific name.

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

Args:
  path: The path to the file, relative to the control dir.
Returns: An open file object, or None if the file does not exist.
N)r�rrr)rTr�r�r�s    rUr��MemoryRepo.get_named_file`s0���$�$�(�(��t�4������x� � rXc��[e)zoFail to open index for this repo, since it is bare.

Raises:
  NoIndexPresent: Raised when no index is present
)rr�s rUr�MemoryRepo.open_indexps
���rXc��UR$)z;Retrieve the config object.

Returns: `ConfigFile` object.
)r�r�s rUr^�MemoryRepo.get_configxs��
�|�|�rXc���U"5nUHnURRU5 M  UR5H upVURR	XV5 M" URSS9 U$)z�Create a new bare repository in memory.

Args:
  objects: Objects for the new repository,
    as iterable
  refs: Refs as dictionary, mapping names
    to object SHA1s
TrH)r�r�r�rCr�r�)rRrBrCrSr��refnamer�s       rUr~�MemoryRepo.init_bares`���e���C����'�'��,�� �J�J�L�L�G��H�H����-�)����T��"��
rX)r�r�r�r�r�rYrQr�)r\r]r^r_r`rVr�rirdr�r�r�r�r�rr^r�r~rarbrXrUr�r�(sR���	!�"�(�!�'�'�+��!� �����rXr�rQrY)or`rpr)r�r�r��collections.abcr�ior�typingrrrrr	r
r�r
rrFr�errorsrrrrrrrrr�filerrKrrrrr�line_endingr r!r�r"r#r$r%r&r'rBr(r)r*r+r,r-r.r/�packr0rCr1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rAr�r�r��REFSDIR_TAGS�
REFSDIR_HEADSrArr�r�r�r�rPrNrd�tupler�r�r�r�r�r�rr�r�r�r�r�r�r�r�r�r�rbrXrU�<module>rs���0�
��
���$�����2��
�
�
����<���	�	�	�,������(�
��	�
�����
����	�	���	��L��I��l���m���I��H�
����!�)�!�4�i�4�
#�u�S�#�X��#�L/'�o�/'�X�c�]�/'�e�/'�d,�$��%���	�%��e��
���B#�t�E�4��;�,>�'?�#�E�#�*�.��$Z�Z�z.����#�9�#�N@�8�N@�bg��grX

Youez - 2016 - github.com/yon3zu
LinuXploit