Add rule to remove a doubled-up "git clone" in a git clone command. (#1106)
Some git hosts will copy the entire clone command, while others just copy the url, so typing "git clone ", then pasting a git url that already has a "git clone " on the front is a somewhat common issue.
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
from thefuck.specific.git import git_support
|
||||
|
||||
|
||||
@git_support
|
||||
def match(command):
|
||||
return (' git clone ' in command.script
|
||||
and 'fatal: Too many arguments.' in command.output)
|
||||
|
||||
|
||||
@git_support
|
||||
def get_new_command(command):
|
||||
return command.script.replace(' git clone ', ' ', 1)
|
||||
Reference in New Issue
Block a user