Skip to content

Commit d1be7ec

Browse files
committed
feat: provide facilities to perform rewrite-tracking for tree-diffs in plumbing.
This effectively pulls down a higher-level implementation in `gix` to the plumbing level, to allow it to be used there as well.
1 parent b5aa82e commit d1be7ec

File tree

12 files changed

+3638
-2
lines changed

12 files changed

+3638
-2
lines changed

Cargo.lock

+44
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,9 @@ serde_derive = ">=1.0.185"
194194

195195
once_cell = "1.18.0"
196196
document-features = { version = "0.2.0", optional = true }
197-
198197
[profile.dev.package]
198+
insta.opt-level = 3
199+
similar.opt-level = 3
199200
gix-object = { opt-level = 3 }
200201
gix-ref = { opt-level = 3 }
201202
#gix-pack = { opt-level = 3 }

gix-diff/Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ autotests = false
1515
[features]
1616
default = ["blob"]
1717
## Enable diffing of blobs using imara-diff, which also allows for a generic rewrite tracking implementation.
18-
blob = ["dep:imara-diff", "dep:gix-filter", "dep:gix-worktree", "dep:gix-path", "dep:gix-fs", "dep:gix-command", "dep:gix-tempfile", "dep:gix-trace"]
18+
blob = ["dep:imara-diff", "dep:gix-filter", "dep:gix-worktree", "dep:gix-path", "dep:gix-fs", "dep:gix-command", "dep:gix-tempfile", "dep:gix-trace", "dep:gix-traverse"]
1919
## Data structures implement `serde::Serialize` and `serde::Deserialize`.
2020
serde = ["dep:serde", "gix-hash/serde", "gix-object/serde"]
2121
## Make it possible to compile to the `wasm32-unknown-unknown` target.
@@ -34,6 +34,7 @@ gix-path = { version = "^0.10.11", path = "../gix-path", optional = true }
3434
gix-fs = { version = "^0.11.3", path = "../gix-fs", optional = true }
3535
gix-tempfile = { version = "^14.0.0", path = "../gix-tempfile", optional = true }
3636
gix-trace = { version = "^0.1.10", path = "../gix-trace", optional = true }
37+
gix-traverse = { version = "^0.41.0", path = "../gix-traverse", optional = true }
3738

3839
thiserror = "1.0.32"
3940
imara-diff = { version = "0.1.7", optional = true }

gix-diff/src/lib.rs

+6
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ pub mod rewrites;
4747
pub mod tree;
4848
pub use tree::function::diff as tree;
4949

50+
///
51+
#[cfg(feature = "blob")]
52+
pub mod tree_with_rewrites;
53+
#[cfg(feature = "blob")]
54+
pub use tree_with_rewrites::function::diff as tree_with_rewrites;
55+
5056
///
5157
#[cfg(feature = "blob")]
5258
pub mod blob;

0 commit comments

Comments
 (0)