-
Notifications
You must be signed in to change notification settings - Fork 446
Return Result values rather than converting errors to None
#1241
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
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
a054f9e
[Result migration] Return `Result` from `AnnotatedCommit::refname()`
DanielEScherzer 0a31d3d
[Result migration] Return `Result` from `BlameHunk::summary()`
DanielEScherzer 5c92b0a
[Result migration] Return `Result` from `Buf::as_str()`
DanielEScherzer 78e0067
[Result migration] Return `Result` from `Commit` methods
DanielEScherzer e12fe49
[Result migration] Return `Result` from `ConfigEntry` methods
DanielEScherzer d791ed1
[Result migration] Return `Result` from `MergeFileResult::path()`
DanielEScherzer 594b670
[Result migration] Return `Result` from `Note::message()`
DanielEScherzer c504587
[Result migration] Return `Result` from `PackBuilder::name()`
DanielEScherzer 2dea70a
[Result migration] Return `Result` from `PushUpdate` methods
DanielEScherzer d156c6d
[Result migration] Return `Result` from `Rebase::orig_head_name()`
DanielEScherzer 422e5c4
[Result migration] Return `Result` from `RebaseOperation::exec()`
DanielEScherzer 940a162
[Result migration] Return `Result` from `Reference` methods
DanielEScherzer 1603727
[Result migration] Return `Result` from `ReflogEntry::message()`
DanielEScherzer 46f85c7
[Result migration] Return `Result` from `Refspec` methods
DanielEScherzer 98d92ae
[Result migration] Return `Result` from `Remote` methods
DanielEScherzer b6c8ab3
[Result migration] Return `Result` from `Repository::namespace()`
DanielEScherzer 64671c1
[Result migration] Return `Result` from `Signature` methods
DanielEScherzer ded499c
[Result migration] Return `Result` from `StatusEntry::path()`
DanielEScherzer c4719c4
[Result migration] Return `Result` from `StringArray::get()`
DanielEScherzer f851627
[Result migration] Return `Result` from `Submodule` methods
DanielEScherzer 1a2e019
[Result migration] Return `Result` from `Tag` methods
DanielEScherzer 876a56a
[Result migration] Return `Result` from `TreeEntry::name()`
DanielEScherzer 8fa1eb0
[Result migration] Return `Result` from `Worktree::name()`
DanielEScherzer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is nice, though also non-utf8 path is rare. I guess we might want to bundle this with libgit2 v2 change, as that would be a larger release having more API changes. What do you think?
View changes since the review
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that there is a benefit to doing this now, so that callers can know what the error was instead of just getting back an opaque None, but ultimately it isn't my call. I just want to say that without a timeline for libgit2 v2 I wouldn't want to delay this indefinitely
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah reasonable. Fine making some breaking changes now than later. Though still want to point how non-utf8 is not that common.