1
0
mirror of https://github.com/nvbn/thefuck.git synced 2024-10-05 18:31:10 +01:00

Fix: rules.git_checkout not working with git 2.22.0 (#934)

* Change: remove period from git checkout error output.

* Change: remove period from git checkout get_new_command.
This commit is contained in:
ik1ne 2019-08-20 04:45:55 +09:00 committed by Vladimir Iakovlev
parent 3bbe391391
commit 335ae40675

View File

@ -8,7 +8,7 @@ from thefuck.shells import shell
@git_support
def match(command):
return ('did not match any file(s) known to git.' in command.output
return ('did not match any file(s) known to git' in command.output
and "Did you forget to 'git add'?" not in command.output)
@ -29,7 +29,7 @@ def get_branches():
def get_new_command(command):
missing_file = re.findall(
r"error: pathspec '([^']*)' "
r"did not match any file\(s\) known to git.", command.output)[0]
r"did not match any file\(s\) known to git", command.output)[0]
closest_branch = utils.get_closest(missing_file, get_branches(),
fallback_to_first=False)
if closest_branch: