[PR #266] Migrate to imara diff #363

Closed
opened 2026-03-02 04:13:25 +03:00 by kerem · 0 comments
Owner

Original Pull Request: https://github.com/git-ai-project/git-ai/pull/266

State: closed
Merged: Yes


While similar diffs were often close to git diffs, we were seeing enough gaps in compatibility that we felt it made sense to migrate to a diffing library that is focused on git compat. Researching several options, including statically linking in git's actual xdiff library, we decided to go with imara-diff. It's the same diff library that the Rust gitoxide library uses internally. It is also substantially more memory-efficient and performant than similar.

To reduce the overall dependency footprint, we also migrated all diff use cases in the codebase to the new imara-diff library and removed diff-match-patch-rs and similar entirely.

**Original Pull Request:** https://github.com/git-ai-project/git-ai/pull/266 **State:** closed **Merged:** Yes --- While `similar` diffs were often close to git diffs, we were seeing enough gaps in compatibility that we felt it made sense to migrate to a diffing library that is focused on git compat. Researching several options, including statically linking in git's actual xdiff library, we decided to go with [imara-diff](https://github.com/pascalkuthe/imara-diff). It's the same diff library that the Rust gitoxide library uses internally. It is also substantially more memory-efficient and performant than `similar`. To reduce the overall dependency footprint, we also migrated all diff use cases in the codebase to the new `imara-diff` library and removed `diff-match-patch-rs` and `similar` entirely.
kerem 2026-03-02 04:13:25 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/git-ai#363
No description provided.