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:
Nyanotech
2020-07-16 21:34:22 +00:00
committed by GitHub
parent 39753a004e
commit 639e9bda7a
3 changed files with 37 additions and 0 deletions
+12
View File
@@ -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)