Skip to content

Return Result values rather than converting errors to None#1241

Open
DanielEScherzer wants to merge 23 commits intorust-lang:masterfrom
DanielEScherzer:return-results
Open

Return Result values rather than converting errors to None#1241
DanielEScherzer wants to merge 23 commits intorust-lang:masterfrom
DanielEScherzer:return-results

Conversation

@DanielEScherzer
Copy link
Copy Markdown
Contributor

Fixes #857

@rustbot rustbot added the S-waiting-on-review Status: Waiting on review label Apr 27, 2026
@DanielEScherzer
Copy link
Copy Markdown
Contributor Author

Now that #1239 has been merged, we should probably return git2::Error on failure rather than directly return Utf8Error

* `Commit::message()`
* `Commit::message_encoding()`
* `Commit::message_raw()`
* `Commit::raw_header()`
* `Commit::summary()`
* `Commit::body()`
* `ConfigEntry::name()`
* `ConfigEntry::value()`
* `PushUpdate::src_refname()`
* `PushUpdate::dst_refname()`
* `Reference::name()`
* `Reference::shorthand()`
* `Reference::symbolic_target()`
* `Refspec::dst()`
* `Refspec::src()`
* `Refspec::str()`
* `Remote::name()`
* `Remote::url()`
* `Remote::pushurl()`
* `Signature::name()`
* `Signature::email()`
* `Submodule::branch()`
* `Submodule::url()`
* `Submodule::name()`
* `Tag::message()`
* `Tag::name()`
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 28, 2026

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Waiting on review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Return Result<&str, Utf8Error> instead of Option<&str>

2 participants