Rules: git remote add instead of set-url if remote does not exist
Tests: Added test for git_remote_seturl_add Rules: renamed new rule with a more appropriate name README: added new rule Style: Formatting New rule: corrected test name Developed tests
This commit is contained in:
committed by
Paul-Louis NECH
parent
019f0abf67
commit
04b83cf7e8
@@ -0,0 +1,14 @@
|
||||
from thefuck.utils import replace_argument
|
||||
from thefuck.specific.git import git_support
|
||||
|
||||
|
||||
@git_support
|
||||
def match(command):
|
||||
return ('set-url' in command.script and 'fatal: No such remote' in command.stderr)
|
||||
|
||||
|
||||
def get_new_command(command):
|
||||
return replace_argument(command.script, 'set-url', 'add')
|
||||
|
||||
|
||||
enabled_by_default = True
|
||||
Reference in New Issue
Block a user