1
0
mirror of https://github.com/nvbn/thefuck.git synced 2024-10-06 02:41:10 +01:00

#618: Refine git_push_without_commits rule

This commit is contained in:
Vladimir Iakovlev 2017-03-22 14:00:03 +01:00
parent 5b1f3ff816
commit b096560469

View File

@ -1,14 +1,13 @@
import re
from thefuck.specific.git import git_support
fix = 'git commit -m "Initial commit." && {command}'
fix = u'git commit -m "Initial commit." && {command}'
refspec_does_not_match = re.compile(r'src refspec \w+ does not match any\.')
@git_support
def match(command):
if refspec_does_not_match.search(command.stderr):
return True
return False
return bool(refspec_does_not_match.search(command.stderr))
def get_new_command(command):