#1131: Add rule for Git commit with no added files

This commit is contained in:
Sergei Haller
2020-09-08 11:47:05 +02:00
committed by Pablo Santiago Blum de Aguiar
parent 799f4127ca
commit 55922e4dbe
3 changed files with 52 additions and 0 deletions
+15
View File
@@ -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')