#1131: Add rule for Git commit with no added files
This commit is contained in:
committed by
Pablo Santiago Blum de Aguiar
parent
799f4127ca
commit
55922e4dbe
@@ -0,0 +1,15 @@
|
||||
from thefuck.utils import replace_argument
|
||||
from thefuck.specific.git import git_support
|
||||
|
||||
priority = 900 # Lower first, default is 1000
|
||||
|
||||
|
||||
@git_support
|
||||
def match(command):
|
||||
return ('commit' in command.script_parts
|
||||
and 'no changes added to commit' in command.output)
|
||||
|
||||
|
||||
@git_support
|
||||
def get_new_command(command):
|
||||
return replace_argument(command.script, 'commit', 'commit -a')
|
||||
Reference in New Issue
Block a user