1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-03-28 05:28:38 +00:00
thefuck/thefuck/rules/git_pull_uncommitted_changes.py

15 lines
393 B
Python

from thefuck.shells import shell
from thefuck.specific.git import git_support
@git_support
def match(command):
return ('pull' in command.script
and ('You have unstaged changes' in command.stderr
or 'contains uncommitted changes' in command.stderr))
@git_support
def get_new_command(command):
return shell.and_('git stash', 'git pull', 'git stash pop')