diff --git a/Cargo.lock b/Cargo.lock index 8d09ed59474..8b09281548f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1957,6 +1957,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..c5941d43342 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", "interrupt"] } +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 10b59506b39..27dc8154772 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. //! diff --git a/tests/journey/gix.sh b/tests/journey/gix.sh index d7d5dfd6050..9a4165677f9 100644 --- a/tests/journey/gix.sh +++ b/tests/journey/gix.sh @@ -38,7 +38,7 @@ title '`gix` crate' (when "running the example program to check order of signal handlers" it "fails as the process aborts" && { - expect_run $ABORTED cargo run --no-default-features --example interrupt-handler-allows-graceful-shutdown + expect_run $ABORTED cargo run --no-default-features --features interrupt --example interrupt-handler-allows-graceful-shutdown } it "cleans up the tempfile it created" && { expect_run $WITH_FAILURE test -e "example-file.tmp" @@ -46,7 +46,7 @@ title '`gix` crate' ) (when "running the example program to check reversibility of signal handlers" it "fails as the process aborts" && { - expect_run $ABORTED cargo run --no-default-features --example reversible-interrupt-handlers + expect_run $ABORTED cargo run --no-default-features --features interrupt --example reversible-interrupt-handlers } ) )