Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#414
This PR fixes all 3 issues in the original bug
does not fix the potential error of editors setting with spaces in the args (as noted in the original comments)
does not change the other places where get_str is called - it probably should
I wanted to add a test for trying to read config str with non UTF8 string name (since this is a failure mode for git2) but this project bans unsafe. unsafe is needed to be able to create an illegal utf8 string
Also note that the code working with config.get_entry does not work how the git2 docs say it should (what errors occur when etc) but it actually works.
Finally: Reviewers, I am still learning my way around rusts idioms and would welcome feedback on how this code can be improved. In particular all the or_else, and_then, if_you_like ,... chaining