Conversation
This was referenced Jan 13, 2026
02213d2 to
271bae6
Compare
There was a problem hiding this comment.
Pull request overview
This pull request migrates the gix-commitgraph crate from using custom error types to using the gix-error infrastructure with Exn<Message>. The changes also rename the erased() method to raise_erased() throughout the codebase and introduce new helper methods and functions for error handling.
Changes:
- Replaced all custom error enums in
gix-commitgraphwithgix_error::MessageandExn<Message> - Renamed
ErrorExt::erased()toErrorExt::raise_erased()and updated all call sites - Added new
message()function and enhancedExnwithdowncast_any_ref()anditer()methods
Reviewed changes
Copilot reviewed 30 out of 31 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| gix-commitgraph/src/verify.rs | Removed Error enum, converted to use Exn<Message> with inline error messages |
| gix-commitgraph/src/init.rs | Removed Error enum, converted to use Exn<Message> with or_raise() pattern |
| gix-commitgraph/src/file/init.rs | Removed Error enum, converted all error returns to use message!() with .raise() |
| gix-commitgraph/src/file/verify.rs | Removed Error and checksum::Error enums, simplified verification error handling |
| gix-commitgraph/src/file/commit.rs | Converted Error enum to return Message for parent iteration errors |
| gix-commitgraph/src/file/mod.rs | Removed Error export as it no longer exists |
| gix-commitgraph/src/lib.rs | Updated public API to return Exn<Message> instead of init::Error |
| gix-error/src/exn/ext.rs | Renamed erased() to raise_erased() for clarity |
| gix-error/src/exn/macros.rs | Modified message!() macro to always call format!() even for literals |
| gix-error/src/exn/impls.rs | Reimplemented erased() with double-boxing, added downcast_any_ref() and iter() |
| gix-error/src/message.rs | Added message() function for creating messages from literals |
| gix-error/src/lib.rs | Exported new message() function |
| gix/src/revision/spec/parse/delegate/revision.rs | Updated all .erased() calls to .raise_erased() |
| gix/src/revision/spec/parse/delegate/navigate.rs | Updated all .erased() calls to .raise_erased() |
| gix/src/revision/spec/parse/delegate/mod.rs | Updated all .erased() calls to .raise_erased() |
| gix/src/repository/mod.rs | Changed error type from gix_commitgraph::init::Error to crate::Error |
| gix/src/repository/graph.rs | Updated error handling to use downcast_any_ref() for NotFound check |
| gix-revwalk/src/graph/commit.rs | Replaced gix_commitgraph::file::commit::Error with gix_error::Message |
| gix-revwalk/Cargo.toml | Added gix-error dependency |
| gix-blame/src/error.rs | Replaced gix_commitgraph::file::commit::Error with gix_error::Message |
| gix-blame/Cargo.toml | Added gix-error dependency |
| gix-revision/tests/revision/spec/parse/mod.rs | Updated test to use .raise_erased() |
| gix-error/tests/error/exn.rs | Updated test and added new tests for erased() conversions |
| gix-commitgraph/tests/commitgraph.rs | Updated test to specify error type as gix_error::Message |
| gix-commitgraph/fuzz/fuzz_targets/fuzz_file.rs | Updated to handle Exn return with .into_inner() |
| gitoxide-core/src/repository/commitgraph/verify.rs | Updated to use Exn::into_error() for anyhow conversion |
| gitoxide-core/src/commitgraph/verify.rs | Updated to use Exn::into_error() for anyhow conversion |
| gix-chunk/src/file/index.rs | Changed message!() to message() for literal string |
| gix-ref/fuzz/fuzz_targets/fuzz_names.rs | Removed unnecessary mut from unused variable |
| Cargo.lock | Updated dependency graph with new gix-error dependencies |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Tasks
Follow Up
anyhowinteraction right away, see usage