Add the git_pull_clone rule

This commit is contained in:
mcarton
2015-07-20 18:42:05 +02:00
parent 569709388d
commit bb7579ead5
2 changed files with 35 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
import re
from thefuck import utils, shells
@utils.git_support
def match(command, settings):
return ('git pull' in command.script
and 'fatal: Not a git repository' in command.stderr
and "Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set)." in command.stderr)
@utils.git_support
def get_new_command(command, settings):
return command.script.replace(' pull ', ' clone ')