mirror of
https://github.com/nvbn/thefuck.git
synced 2025-01-18 20:11:17 +00:00
#618: Refine git_push_without_commits
rule
This commit is contained in:
parent
5b1f3ff816
commit
b096560469
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user