mirror of
https://github.com/nvbn/thefuck.git
synced 2025-04-15 23:30:44 +01:00
16 lines
333 B
Python
16 lines
333 B
Python
import re
|
|
|
|
fix = 'git commit -m "Initial commit." && {command}'
|
|
refspec_does_not_match = re.compile(r'src refspec \w+ does not match any\.')
|
|
|
|
|
|
def match(command):
|
|
if refspec_does_not_match.search(command.stderr):
|
|
return True
|
|
|
|
return False
|
|
|
|
|
|
def get_new_command(command):
|
|
return fix.format(command=command.script)
|