diff --git a/Cargo.lock b/Cargo.lock index 7c8f97b1e89..7fa264f4b6c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1959,6 +1959,7 @@ dependencies = [ "futures-lite", "gix-hash 0.12.0", "gix-odb", + "gix-pack", "maybe-async", "pin-project-lite", "serde", diff --git a/Cargo.toml b/Cargo.toml index 3bfc1bda5ee..f997bea91cd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -44,7 +44,7 @@ max = ["max-control", "fast", "gitoxide-core-blocking-client", "http-client-curl max-pure = ["max-control", "gix-features/rustsha1", "gix-features/zlib-rust-backend", "http-client-reqwest", "gitoxide-core-blocking-client" ] ## Like `max`, but with more control for configuration. See the *Package Maintainers* headline for more information. -max-control = ["tracing", "fast-safe", "pretty-cli", "gitoxide-core-tools-query", "gitoxide-core-tools-corpus", "gitoxide-core-tools", "prodash-render-line", "prodash-render-tui", "prodash/render-line-autoconfigure", "gix/regex" ] +max-control = ["tracing", "fast-safe", "pretty-cli", "gitoxide-core-tools-query", "gitoxide-core-tools-corpus", "gitoxide-core-tools", "prodash-render-line", "prodash-render-tui", "prodash/render-line-autoconfigure", "gix/revparse-regex" ] ## All of the good stuff, with less fanciness for smaller binaries. ## diff --git a/gitoxide-core/Cargo.toml b/gitoxide-core/Cargo.toml index 2b1873d704d..ff8a58b3acf 100644 --- a/gitoxide-core/Cargo.toml +++ b/gitoxide-core/Cargo.toml @@ -44,8 +44,8 @@ serde = ["gix/serde", "dep:serde_json", "dep:serde", "bytesize/serde"] [dependencies] # deselect everything else (like "performance") as this should be controllable by the parent application. -gix = { version = "^0.53.0", path = "../gix", default-features = false } -gix-pack-for-configuration-only = { package = "gix-pack", version = "^0.41.0", path = "../gix-pack", default-features = false, features = ["pack-cache-lru-dynamic", "pack-cache-lru-static"] } +gix = { version = "^0.53.0", path = "../gix", default-features = false, features = ["blob-diff", "revision", "mailmap", "excludes", "attributes", "worktree-mutation", "credentials"] } +gix-pack-for-configuration-only = { package = "gix-pack", version = "^0.41.0", path = "../gix-pack", default-features = false, features = ["pack-cache-lru-dynamic", "pack-cache-lru-static", "generate", "streaming-input"] } gix-transport-configuration-only = { package = "gix-transport", version = "^0.35.0", path = "../gix-transport", default-features = false } gix-archive-for-configuration-only = { package = "gix-archive", version = "^0.3.0", path = "../gix-archive", optional = true, features = ["tar", "tar_gz"] } serde = { version = "1.0.114", optional = true, default-features = false, features = ["derive"] } diff --git a/gitoxide-core/src/repository/exclude.rs b/gitoxide-core/src/repository/exclude.rs index f3ed2e3595a..b73af2a8767 100644 --- a/gitoxide-core/src/repository/exclude.rs +++ b/gitoxide-core/src/repository/exclude.rs @@ -2,7 +2,7 @@ use std::borrow::Cow; use std::io; use anyhow::{anyhow, bail}; -use gix::{bstr::BStr, prelude::FindExt}; +use gix::bstr::BStr; use crate::{repository::PathsOrPatterns, OutputFormat}; @@ -49,7 +49,7 @@ pub fn query( .metadata() .ok() .map(|m| m.is_dir()); - let entry = cache.at_entry(path.as_slice(), is_dir, |oid, buf| repo.objects.find_blob(oid, buf))?; + let entry = cache.at_entry(path.as_slice(), is_dir)?; let match_ = entry .matching_exclude_pattern() .and_then(|m| (show_ignore_patterns || !m.pattern.is_negative()).then_some(m)); @@ -68,7 +68,7 @@ pub fn query( .index_entries_with_paths(&index) .ok_or_else(|| anyhow!("Pathspec didn't yield any entry"))? { - let entry = cache.at_entry(path, Some(false), |oid, buf| repo.objects.find_blob(oid, buf))?; + let entry = cache.at_entry(path, Some(false))?; let match_ = entry .matching_exclude_pattern() .and_then(|m| (show_ignore_patterns || !m.pattern.is_negative()).then_some(m)); diff --git a/gix-packetline/Cargo.toml b/gix-packetline/Cargo.toml index 863f4ee4c9b..0cd8753d1e1 100644 --- a/gix-packetline/Cargo.toml +++ b/gix-packetline/Cargo.toml @@ -52,6 +52,7 @@ document-features = { version = "0.2.0", optional = true } [dev-dependencies] gix-odb = { path = "../gix-odb" } +gix-pack-for-configuration = { package = "gix-pack", path = "../gix-pack", default-features = false, features = ["streaming-input"] } gix-hash = { path = "../gix-hash" } async-std = { version = "1.9.0", features = ["attributes"] } maybe-async = "0.2.6" diff --git a/gix/src/lib.rs b/gix/src/lib.rs index dcf9b8a08aa..342157d398f 100644 --- a/gix/src/lib.rs +++ b/gix/src/lib.rs @@ -60,7 +60,7 @@ //! Entering `git2` into the search field will also surface all methods with such annotations. //! //! What follows is a list of methods you might be missing, along with workarounds if available. -//! * [`git2::Repository::open_bare()`](https://docs.rs/git2/*/git2/struct.Repository.html#method.open_bare) ➡ ❌ - use [`open()`] and discard it is not bare. +//! * [`git2::Repository::open_bare()`](https://docs.rs/git2/*/git2/struct.Repository.html#method.open_bare) ➡ ❌ - use [`open()`] and discard if it is not bare. //! * [`git2::build::CheckoutBuilder::disable_filters()](https://docs.rs/git2/*/git2/build/struct.CheckoutBuilder.html#method.disable_filters) ➡ ❌ *(filters are always applied during checkouts)* //! * [`git2::Repository::submodule_status()`](https://docs.rs/git2/*/git2/struct.Repository.html#method.submodule_status) ➡ [`Submodule::state()`] - status provides more information and conveniences though, and an actual worktree status isn't performed. //!