Skip to content

Conversation

@cruessler
Copy link
Contributor

This is a companion to #2287. It updates the diff slider test to use imara-diff 0.2. In my non-representative sample of ~3000 diffs from gitoxide, it matches the git baseline in ~95 % of cases.

❯ cargo test --package gix-diff-tests slider -- --nocapture
[…]

thread 'blob::slider::baseline' (23361) panicked at gix-diff/tests/diff/blob/slider.rs:83:5:
assertion `left == right` failed: matching diffs 2930 == total diffs 3094 [94.70 %]

use gix_diff::blob::intern::TokenSource;
use gix_diff::blob::unified_diff::ContextSize;
use gix_diff::blob::{Algorithm, UnifiedDiff};
use gix_diff::blob::v2::{Algorithm, BasicLineDiffPrinter, Diff, InternedInput, UnifiedDiffConfig};
Copy link
Member

Choose a reason for hiding this comment

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

It's interesting that v2 is available at all as it shouldn't be available by default.
Let me fix that

Copy link
Member

Choose a reason for hiding this comment

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

Hmm, seems like this code should not compile, it's fine on main.

Copy link
Member

Choose a reason for hiding this comment

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

Sorry about that, I didn't realise that this is a test in gix-diff-tests, which enables the feature. It was a long day yesterday 😅.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No worries, I also could have provided that context. :-)

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