ó
    ‘óýj#  ã                   ó8   • S r S/rSSSS.S\S\S\S\S	\4
S
 jjrg)zFGit stripspace functionality for cleaning up text and commit messages.Ú
stripspaceFó   #)Ústrip_commentsÚcomment_charÚcomment_linesÚtextr   r   r   Úreturnc                ó  • U (       d  gU R                  SS9n/ nU H—  nSnUR                  S5      (       a  SnO1UR                  S5      (       a  SnOUR                  S5      (       a  SnUR                  S5      R                  5       nU(       a  U(       a  US-   U-   nUR	                  X‡-   5        M™     U(       a8  U Vs/ s H+  nUR                  5       R                  U5      (       a  M)  UPM-     nnU(       d  gS	[        S
[        4S jn	Sn
U
[        U5      :  a4  U	" XZ   5      (       a%  U
S-  n
U
[        U5      :  a  U	" XZ   5      (       a  M%  XZS nU(       a9  U	" US   5      (       a)  UR                  5         U(       a  U	" US   5      (       a  M)  / nSnU H.  nU	" U5      nU(       a	  U(       a  M  UR	                  U5        UnM0     U(       d  gSR                  U5      nUR                  S5      (       d  US-  nU$ s  snf )a}  Strip unnecessary whitespace from text.

This function mimics the behavior of ``git stripspace``, which is commonly
used to clean up commit messages and other text content.

Args:
  text: The text to process (as bytes)
  strip_comments: If True, remove lines that begin with comment_char
  comment_char: The comment character to use (default: b"#")
  comment_lines: If True, prepend comment_char to each line

Returns:
  The processed text as bytes

The function performs the following operations (in order):
  1. If comment_lines is True, prepend comment_char + space to each line
  2. Strip trailing whitespace from each line
  3. If strip_comments is True, remove lines starting with comment_char
  4. Collapse multiple consecutive blank lines into a single blank line
  5. Remove leading blank lines
  6. Remove trailing blank lines
  7. Ensure the text ends with a newline (unless empty)
ó    T)Úkeependsó   
ó   
ó   s   
	 ó    Úliner   c                 ó(   • U R                  5       S:H  $ )Nr
   )Ústrip)r   s    Ú=/usr/local/lib/python3.13/site-packages/dulwich/stripspace.pyÚis_blankÚstripspace.<locals>.is_blankd   s   € Ø�z‰z‹|˜sÑ"Ð"r
   é    é   NéÿÿÿÿF)r   r   r   )Ú
splitlinesÚendswithÚrstripÚlstripÚappendÚ
startswithÚbytesÚboolÚlenÚpopÚjoin)r   r   r   r   ÚlinesÚprocessed_linesr   Úline_endingÚstripped_contentr   ÚstartÚcollapsed_linesÚprev_was_blankÚis_current_blankÚresults                  r   r   r      s  € ö< Øð �O‰O TˆOÐ*€Eð €OÛˆàˆØ�=‰=˜×!Ñ!Ø!‰KØ�]‰]˜5×!Ñ!Ø‰KØ�]‰]˜5×!Ñ!ØˆKð  Ÿ;™; zÓ2×9Ñ9Ó;Ðö Ö-Ø+¨dÑ2Ð5EÑEÐð 	×ÑÐ/Ñ=Ö>ñ% ö* ñ (ó
â'�Ø—;‘;“=×+Ñ+¨L×9÷ Ù'ð 	ð 
ö Øð#”uð #¤ô #ð €EØ
”#�oÓ&Ó
&©8°OÑ4J×+KÑ+KØ�‰
ˆð ”#�oÓ&Ó
&©8°OÑ4J×+KÓ+Kà% fÐ-€Oö ™h °rÑ':×;Ñ;Ø×ÑÔö ™h °rÑ':×;Ó;ð €OØ€NÛˆÙ# D›>ÐÞ¦áØ×Ñ˜tÔ$Ø)Šñ  ö Øð �X‰X�oÓ&€Fð �?‰?Ð2×3Ñ3Ø�%‰ˆà€Mùòa
s   Ã(HÃ.HN)Ú__doc__Ú__all__r   r    r   © r
   r   Ú<module>r0      s]   ðñ, Mð ð€ð !ØØòlØ
ðlð ðlð ð	lð
 ðlð ölr
   