git_flag_after_filename: Handle new error message

See https://github.com/git/git/commit/2a5aa826eec2eec64b4065f599ee7fb613a871ba
This commit is contained in:
Joseph Frazier
2017-10-31 12:26:41 -04:00
parent f1fab0dbb2
commit 8fb5ddefb6
2 changed files with 13 additions and 3 deletions
+2 -1
View File
@@ -2,11 +2,12 @@ import re
from thefuck.specific.git import git_support
error_pattern = "fatal: bad flag '(.*?)' used after filename"
error_pattern2 = "fatal: option '(.*?)' must come before non-option arguments"
@git_support
def match(command):
return re.search(error_pattern, command.output)
return re.search(error_pattern, command.output) or re.search(error_pattern2, command.output)
@git_support