Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Aug 19, 2019
Merged

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

merged 2 commits into from
Aug 19, 2019

Conversation

ik1ne
Copy link
Contributor

@ik1ne ik1ne commented Jul 19, 2019

(.env) ik1nes-MacBook-Pro:~/Sources/thefuck ik1ne % git --version
git version 2.22.0
hub version 2.12.2
(.env) ik1nes-MacBook-Pro:~/Sources/thefuck ik1ne % thefuck --version
The Fuck 3.29 using Python 3.7.4 and ZSH 5.3
(.env) ik1nes-MacBook-Pro:~/Sources/thefuck ik1ne % git checkout mastr
error: pathspec 'mastr' did not match any file(s) known to git
(.env) ik1nes-MacBook-Pro:~/Sources/thefuck ik1ne % thefuck
Nothing found

As shown above, git 2.22.0 does not print period in its output so rules.git_checkout.match does not work with git 2.22.0.
So I removed the period in the string search.
Since it uses 'string' in command.output, previous version of git which prints period shouldn't be affected by this change. (tested the same command above inside git 2.17.2 and it works fine)

@ik1ne
Copy link
Contributor Author

ik1ne commented Jul 22, 2019

Added a new commit since exception with the same reason was happening to get_new_command.

@ik1ne ik1ne changed the title Fix: rules.git_checkout.match not working with git 2.22.0 Fix: rules.git_checkout not working with git 2.22.0 Jul 22, 2019
@nvbn
Copy link
Owner

nvbn commented Aug 19, 2019

Looks good, thanks!

@nvbn nvbn merged commit 335ae40 into nvbn:master Aug 19, 2019
@ik1ne ik1ne deleted the checkout-fix branch August 22, 2019 00:56
riley-martine pushed a commit to riley-martine/thefuck that referenced this pull request Dec 7, 2023
* Change: remove period from git checkout error output.

* Change: remove period from git checkout get_new_command.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants