Skip to content

Commit

Permalink
Fix: rules.git_checkout not working with git 2.22.0 (#934)
Browse files Browse the repository at this point in the history
* Change: remove period from git checkout error output.

* Change: remove period from git checkout get_new_command.
  • Loading branch information
ik1ne authored and nvbn committed Aug 19, 2019
1 parent 3bbe391 commit 335ae40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions thefuck/rules/git_checkout.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

@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)


Expand All @@ -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:
Expand Down

0 comments on commit 335ae40

Please sign in to comment.