Skip to content

gix-commitgraph to gix-error#2378

Merged
Byron merged 6 commits intomainfrom
gix-error
Jan 18, 2026
Merged

gix-commitgraph to gix-error#2378
Byron merged 6 commits intomainfrom
gix-error

Conversation

@Byron
Copy link
Member

@Byron Byron commented Jan 13, 2026

Tasks

  • impl

Follow Up

  • figure out anyhow interaction right away, see usage

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-commitgraph with gix_error::Message and Exn<Message>
  • Renamed ErrorExt::erased() to ErrorExt::raise_erased() and updated all call sites
  • Added new message() function and enhanced Exn with downcast_any_ref() and iter() 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

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 30 out of 31 changed files in this pull request and generated no new comments.

@Byron Byron marked this pull request as ready for review January 18, 2026 12:32
@Byron Byron enabled auto-merge January 18, 2026 12:35
@Byron Byron merged commit 6cff657 into main Jan 18, 2026
36 checks passed
@Byron Byron deleted the gix-error branch January 18, 2026 12:52
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