Skip to content

Conversation

@cruessler
Copy link
Contributor

This PR changes gix-blame to always use imara-diff 0.2 through gix-diff/blame-experimental. It removes the blob-experimental feature flag in gix-blame as well as the blame-experimental feature flag in gix.

This PR does not yet change gix-diff itself yet. I’m in the process of preparing a separate PR for that switch as well, but I thought the transition was easier to do and review in smaller PRs. If you think this should be done in a single PR, though, I’ll be happy to incorporate the other changes into this PR as well. Let me know what you think!

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 PR completes the transition of gix-blame to always use the imara-diff v0.2-backed implementation (via gix-diff’s experimental blob diff feature), and removes the now-obsolete feature flags that previously selected between v0.1 and v0.2.

Changes:

  • Remove blame-experimental feature wiring from the workspace (Cargo.toml, gitoxide-core, gix) and stop running gix-blame tests with the old blob-experimental flag.
  • Make gix-blame always enable gix-diff’s blob-experimental feature and remove the gix-blame-level blob-experimental feature.
  • Simplify/adjust the blame disparity test to run both Myers and Histogram under the unified setup.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
justfile Stops running gix-blame unit tests with the removed blob-experimental feature.
gix/Cargo.toml Removes the blame-experimental feature flag from gix.
gix-blame/tests/blame.rs Updates the disparity regression test to run both algorithms under the always-v0.2 setup.
gix-blame/src/file/function.rs Removes the non-experimental blob diff code path, leaving the v0.2-based implementation.
gix-blame/Cargo.toml Removes the crate feature and enables gix-diff’s blob-experimental unconditionally.
gitoxide-core/Cargo.toml Removes the blame-experimental feature passthrough.
Cargo.toml Removes the workspace-level blame-experimental feature passthrough.
Comments suppressed due to low confidence (2)

gix-blame/tests/blame.rs:325

  • This test uses multiple .unwrap() calls (e.g., Fixture::new().unwrap()), which makes failures harder to diagnose and goes against the project’s general “no unwrap” practice. Consider returning gix_testtools::Result from the test and using ?, or use .expect("…") with context.
        let Fixture {
            odb,
            mut resource_cache,
            suspect,
        } = Fixture::new().unwrap();

gix-blame/tests/blame.rs:349

  • More .unwrap()s here (gix_blame::file(...).unwrap(), fixture_path().unwrap(), Baseline::collect(...).unwrap()). Prefer propagating errors via ? (by making the test return gix_testtools::Result) or at least adding contextual .expect() messages so failures are actionable.
        let lines_blamed = gix_blame::file(
            &odb,
            suspect,
            None,
            &mut resource_cache,
            source_file_name.as_ref(),
            gix_blame::Options {
                diff_algorithm,
                ranges: BlameRanges::default(),
                since: None,
                rewrites: Some(gix_diff::Rewrites::default()),
                debug_track_path: false,
            },
        )
        .unwrap()
        .entries;

        assert_eq!(lines_blamed.len(), 5);

        let git_dir = fixture_path().unwrap().join(".git");
        let baseline = Baseline::collect(git_dir.join(format!("{case}.baseline")), source_file_name).unwrap();

Copy link
Member

@Byron Byron left a comment

Choose a reason for hiding this comment

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

Fantastic, thanks!

Now we have experimental support by default for everyone who uses default gix features, but that's alright.

@Byron Byron enabled auto-merge February 8, 2026 10:31
@Byron Byron merged commit 28fbeb8 into GitoxideLabs:main Feb 8, 2026
30 checks passed
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