
    l:i                     l    d dl Z d dlmZ d dlmZ d dlmZ d dlmZ ed        Z	ed        Z
ed        Zy)	    N)shell)git_support)Path)memoizec                     t        j                  d| j                        d   }t        |      j	                         r|S y )NzCerror: pathspec '([^']*)' did not match any file\(s\) known to git.r   )refindalloutputr   exists)commandpathspecs     L/var/www/html/bot/venv/lib/python3.12/site-packages/thefuck/rules/git_add.py_get_missing_filer      sB    zz	56=nnFFGIH H~     c                 8    d| j                   v xr t        |       S )Nz'did not match any file(s) known to git.)r
   r   )r   s    r   matchr      s     5G +!'*,r   c                 |    t        |       }t        j                  dd      }|j                  || j                        S )Nzgit add -- {}z{})r   r   and_formatscript)r   missing_fileformatmes      r   get_new_commandr      s1    $W-Lzz/40H??<88r   )r   thefuck.shellsr   thefuck.specific.gitr   thefuck.systemr   thefuck.utilsr   r   r   r    r   r   <module>r      sP    	   ,  ! 	 	 , ,
 9 9r   