mirror of
https://github.com/nvbn/thefuck.git
synced 2025-11-14 13:55:58 +00:00
15 lines
410 B
Python
15 lines
410 B
Python
from thefuck import shells, utils
|
|
|
|
|
|
@utils.git_support
|
|
def match(command, settings):
|
|
# catches "Please commit or stash them" and "Please, commit your changes or
|
|
# stash them before you can switch branches."
|
|
return 'or stash them' in command.stderr
|
|
|
|
|
|
@utils.git_support
|
|
def get_new_command(command, settings):
|
|
formatme = shells.and_('git stash', '{}')
|
|
return formatme.format(command.script)
|