From 25efbfb72e5a043ce8f7d196c1f7104ef93394df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20R=C3=BC=C3=9Fler?= Date: Thu, 19 Dec 2024 20:14:50 +0100 Subject: [PATCH] feat: Add `blame` plumbing crate to the top-level. For now, it doesn't come with a simplified `gix` API though. --- Cargo.lock | 9 +++++---- gix-blame/Cargo.toml | 6 +++--- gix/Cargo.toml | 4 ++++ gix/src/lib.rs | 2 ++ 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f09c7f8a822..ca292869281 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1365,6 +1365,7 @@ dependencies = [ "gix-actor 0.33.1", "gix-archive", "gix-attributes 0.23.1", + "gix-blame", "gix-command", "gix-commitgraph 0.25.1", "gix-config", @@ -1540,14 +1541,14 @@ version = "0.0.0" dependencies = [ "gix-diff", "gix-filter", - "gix-fs 0.12.0", + "gix-fs 0.12.1", "gix-hash 0.15.1", "gix-index 0.37.0", - "gix-object 0.46.0", + "gix-object 0.46.1", "gix-odb", - "gix-ref 0.49.0", + "gix-ref 0.49.1", "gix-testtools", - "gix-traverse 0.43.0", + "gix-traverse 0.43.1", "gix-worktree 0.38.0", ] diff --git a/gix-blame/Cargo.toml b/gix-blame/Cargo.toml index 747f2bf17b6..ed0018bc9ee 100644 --- a/gix-blame/Cargo.toml +++ b/gix-blame/Cargo.toml @@ -14,7 +14,7 @@ rust-version = "1.65" doctest = false [dependencies] -gix-diff = { version = "^0.48.0", path = "../gix-diff", default-features = false, features = ["blob"] } +gix-diff = { version = "^0.49.0", path = "../gix-diff", default-features = false, features = ["blob"] } gix-object = { version = "^0.46.0", path = "../gix-object" } gix-hash = { version = "^0.15.0", path = "../gix-hash" } gix-worktree = { version = "^0.38.0", path = "../gix-worktree", default-features = false, features = ["attributes"] } @@ -22,8 +22,8 @@ gix-traverse = { version = "^0.43.0", path = "../gix-traverse" } [dev-dependencies] gix-ref = { version = "^0.49.0", path = "../gix-ref" } -gix-filter = { version = "^0.15.0", path = "../gix-filter" } +gix-filter = { version = "^0.16.0", path = "../gix-filter" } gix-fs = { version = "^0.12.0", path = "../gix-fs" } gix-index = { version = "^0.37.0", path = "../gix-index" } -gix-odb = { version = "^0.65.0", path = "../gix-odb" } +gix-odb = { version = "^0.66.0", path = "../gix-odb" } gix-testtools = { path = "../tests/tools" } diff --git a/gix/Cargo.toml b/gix/Cargo.toml index fcfc29706a3..c0578080ff9 100644 --- a/gix/Cargo.toml +++ b/gix/Cargo.toml @@ -141,6 +141,9 @@ blob-diff = ["gix-diff/blob", "attributes"] ## Add functions to specifically merge files, using the standard three-way merge that git offers. merge = ["tree-editor", "blob-diff", "dep:gix-merge", "attributes"] +## Add blame command similar to `git blame`. +blame = ["dep:gix-blame"] + ## Make it possible to turn a tree into a stream of bytes, which can be decoded to entries and turned into various other formats. worktree-stream = ["gix-worktree-stream", "attributes"] @@ -371,6 +374,7 @@ gix-command = { version = "^0.4.0", path = "../gix-command", optional = true } gix-worktree-stream = { version = "^0.18.0", path = "../gix-worktree-stream", optional = true } gix-archive = { version = "^0.18.0", path = "../gix-archive", default-features = false, optional = true } +gix-blame = { version= "^0.0.0", path ="../gix-blame", optional = true } # For communication with remotes gix-protocol = { version = "^0.47.0", path = "../gix-protocol" } diff --git a/gix/src/lib.rs b/gix/src/lib.rs index 906db6bb3e8..6c8d06f91dd 100644 --- a/gix/src/lib.rs +++ b/gix/src/lib.rs @@ -95,6 +95,8 @@ pub use gix_actor as actor; #[cfg(feature = "attributes")] pub use gix_attributes as attrs; +#[cfg(feature = "blame")] +pub use gix_blame as blame; #[cfg(feature = "command")] pub use gix_command as command; pub use gix_commitgraph as commitgraph;