ctx-tui 2.0.4

Manage repo-scoped work contexts: fresh checkouts wrapped in terminal multiplexer sessions
Documentation
�

"�jx����SSKrSSKrSSKrSSKrSSKrSSKJr SrSr\"S5r	S\
\\44Sjr"SS	\R5rSS
.S\S\S-S\4S
jjrSS
.S\S\S-S\4Sjjrg)�N)�PathzKssh -o ConnectTimeout=10 -o ServerAliveInterval=15 -o ServerAliveCountMax=3)�-czhttp.lowSpeedLimit=1000rzhttp.lowSpeedTime=60�/�returnc��[[R5nURS[5 URSS5 U$)N�GIT_SSH_COMMAND�GIT_TERMINAL_PROMPT�0)�dict�os�environ�
setdefault�_SSH_COMMAND)�envs �A/Users/michael/dev/contexts/ctx/rewrite-it-in-rust/src/ctx/git.py�_envrs3��
�r�z�z�
�C��N�N�$�l�3��N�N�(�#�.��J�c�4^�\rSrSrSrS\4U4SjjrSrU=r$)�GitError�zMA failed git call whose message is git's own error, not just the exit status.rc�x>�UR=(d SR5nU=(d [TU]
5$)N�)�stderr�strip�super�__str__)�self�detail�	__class__s  �rr�GitError.__str__s,����+�+�#��*�*�,���*����*�*r�)	�__name__�
__module__�__qualname__�__firstlineno__�__doc__�strr�__static_attributes__�
__classcell__)rs@rrrs���W�+��+�+rr)�cwd�argsr*c	���[R"S/[QUQU=(d [S[RS[5S9nURR5$)z�Run git, letting stderr (progress, errors) stream to the terminal.

Every call gets the timeouts, not just the ones that reach a remote: they
are inert for local work, and marking each remote call by hand is a thing
to get wrong.
�gitT)r*�check�stdout�textr)�
subprocess�run�
_STALL_CONFIG�	_SAFE_CWD�PIPErr/r)r*r+�results   rr-r-$sQ���^�^�	�&��&��&���9�����
��F�
�F��=�=��� � rc	��# �S/[QUQn[R"UU=(d [[	5[R
R[R
RSS.6IShv�NnUR5IShv�NupEUR$(a1['UR$X$R)SS9UR)SS95eUR)SS9R+5$N~Ng![Ra [R"[5 [R"UR[R 5 SSS5 O!,(df   O=fUR#5IShv�N ef=f7f)uZLike `git`, but awaitable, quiet, and safe to cancel mid-transfer.

stderr is captured into the exception rather than streamed: the callers
are UIs that must not be written over. Cancellation kills git's whole
process group — git alone would leave its ssh child holding the
connection — so a caller that stops waiting stops the transfer too.
r-T)r*rr/r�start_new_sessionN�replace)�errors)r3�asyncio�create_subprocess_execr4rr1r5�communicate�CancelledError�
contextlib�suppress�OSErrorr�killpg�pid�signal�SIGKILL�wait�
returncoder�decoder)r*r+�argv�procr/rs      r�	git_asyncrK6s+���
�)�M�)�D�)�D��/�/�	
���9��F��!�!�&�&��!�!�&�&��
��D��#�/�/�1�1��������O�O�T�=�=�	�=�#B�F�M�M�Yb�M�Dc�
�	
��=�=�	�=�*�0�0�2�2�'�2���!�!��
�
 �
 ��
)��I�I�d�h�h����/�*�
)�
)���i�i�k���
�	�sa�A.F	�0C/�1F	�6C3�	C1�
C3�A F	�1C3�3.F�!0E�	F�
E(	�$F�>F�?F�F	)r;r?rrDr1�pathlibrrr3r4rr'r�CalledProcessErrorrr-rKr!rr�<module>rNs�����	�
���
]��O�
�

��I�	��d�3��8�n��+�z�,�,�+�(,�!�s�!����!��!�$48�3�3�3�T�D�[�3�C�3r