From eed32954b2e2acec6721211a4f8cd19b01a52ac4 Mon Sep 17 00:00:00 2001 From: Yuya Nishihara Date: Thu, 14 Nov 2024 18:25:26 +0900 Subject: [PATCH] cargo: import fix_filter from gix::filter::plumbing I don't think we need to declare these dependencies separately because both are the optional dependencies enabled by the git feature. We'll also need the gix's "attributes" feature at some point. > attributes - Query attributes and excludes. Enables access to pathspecs, > worktree checkouts, filter-pipelines and submodules. https://docs.rs/gix/0.67.0/gix/index.html#feature-flags --- Cargo.lock | 1 - Cargo.toml | 4 ++-- lib/Cargo.toml | 3 +-- lib/src/git_backend.rs | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9bbaa791e..0bf8b6751 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1872,7 +1872,6 @@ dependencies = [ "futures 0.3.31", "git2", "gix", - "gix-filter", "glob", "hashbrown 0.15.1", "hex", diff --git a/Cargo.toml b/Cargo.toml index 1e6e49c94..ee3f7139b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -58,11 +58,11 @@ git2 = { version = "0.19.0", features = [ "vendored-libgit2" ] } gix = { version = "0.66.0", default-features = false, features = [ + "attributes", + "blob-diff", "index", "max-performance-safe", - "blob-diff", ] } -gix-filter = "0.13.0" glob = "0.3.1" hashbrown = { version = "0.15.1", default-features = false, features = ["inline-more"] } hex = "0.4.3" diff --git a/lib/Cargo.toml b/lib/Cargo.toml index 5701e8933..53b035ab6 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -45,7 +45,6 @@ either = { workspace = true } futures = { workspace = true } git2 = { workspace = true, optional = true } gix = { workspace = true, optional = true } -gix-filter = { workspace = true, optional = true } glob = { workspace = true } hashbrown = { workspace = true } hex = { workspace = true } @@ -97,7 +96,7 @@ tokio = { workspace = true, features = ["full"] } [features] default = ["git"] -git = ["dep:git2", "dep:gix", "dep:gix-filter"] +git = ["dep:git2", "dep:gix"] vendored-openssl = ["git2/vendored-openssl"] watchman = ["dep:tokio", "dep:watchman_client"] testing = ["git"] diff --git a/lib/src/git_backend.rs b/lib/src/git_backend.rs index 2d979d367..0e86e9f38 100644 --- a/lib/src/git_backend.rs +++ b/lib/src/git_backend.rs @@ -430,7 +430,7 @@ impl GitBackend { ); let filter = gix::diff::blob::Pipeline::new( Default::default(), - gix_filter::Pipeline::new( + gix::filter::plumbing::Pipeline::new( self.git_repo() .command_context() .map_err(|err| BackendError::Other(Box::new(err)))?,