Skip to content

Commit 6135a5e

Browse files
committed
Merge branch 'optimizations'
2 parents a1ed6a1 + 805b8aa commit 6135a5e

File tree

98 files changed

+968
-632
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+968
-632
lines changed

Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ max = ["max-control", "fast", "gitoxide-core-blocking-client", "http-client-curl
4444
max-pure = ["max-control", "gix-features/rustsha1", "gix-features/zlib-rust-backend", "http-client-reqwest", "gitoxide-core-blocking-client" ]
4545

4646
## Like `max`, but with more control for configuration. See the *Package Maintainers* headline for more information.
47-
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" ]
47+
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" ]
4848

4949
## All of the good stuff, with less fanciness for smaller binaries.
5050
##

gitoxide-core/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ serde = ["gix/serde", "dep:serde_json", "dep:serde", "bytesize/serde"]
4444

4545
[dependencies]
4646
# deselect everything else (like "performance") as this should be controllable by the parent application.
47-
gix = { version = "^0.53.0", path = "../gix", default-features = false }
48-
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"] }
47+
gix = { version = "^0.53.0", path = "../gix", default-features = false, features = ["blob-diff", "revision", "mailmap", "excludes", "attributes", "worktree-mutation", "credentials", "interrupt"] }
48+
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"] }
4949
gix-transport-configuration-only = { package = "gix-transport", version = "^0.35.0", path = "../gix-transport", default-features = false }
5050
gix-archive-for-configuration-only = { package = "gix-archive", version = "^0.3.0", path = "../gix-archive", optional = true, features = ["tar", "tar_gz"] }
5151
serde = { version = "1.0.114", optional = true, default-features = false, features = ["derive"] }

gitoxide-core/src/repository/exclude.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::borrow::Cow;
22
use std::io;
33

44
use anyhow::{anyhow, bail};
5-
use gix::{bstr::BStr, prelude::FindExt};
5+
use gix::bstr::BStr;
66

77
use crate::{repository::PathsOrPatterns, OutputFormat};
88

@@ -49,7 +49,7 @@ pub fn query(
4949
.metadata()
5050
.ok()
5151
.map(|m| m.is_dir());
52-
let entry = cache.at_entry(path.as_slice(), is_dir, |oid, buf| repo.objects.find_blob(oid, buf))?;
52+
let entry = cache.at_entry(path.as_slice(), is_dir)?;
5353
let match_ = entry
5454
.matching_exclude_pattern()
5555
.and_then(|m| (show_ignore_patterns || !m.pattern.is_negative()).then_some(m));
@@ -68,7 +68,7 @@ pub fn query(
6868
.index_entries_with_paths(&index)
6969
.ok_or_else(|| anyhow!("Pathspec didn't yield any entry"))?
7070
{
71-
let entry = cache.at_entry(path, Some(false), |oid, buf| repo.objects.find_blob(oid, buf))?;
71+
let entry = cache.at_entry(path, Some(false))?;
7272
let match_ = entry
7373
.matching_exclude_pattern()
7474
.and_then(|m| (show_ignore_patterns || !m.pattern.is_negative()).then_some(m));

gix-archive/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ document-features = { version = "0.2.0", optional = true }
4343
[dev-dependencies]
4444
gix-testtools = { path = "../tests/tools"}
4545
gix-odb = { path = "../gix-odb"}
46-
gix-worktree = { path = "../gix-worktree"}
46+
gix-worktree = { path = "../gix-worktree", default-features = false, features = ["attributes"]}
4747
gix-hash = { path = "../gix-hash"}
4848
gix-attributes = { path = "../gix-attributes"}
4949
gix-object = { path = "../gix-object"}

gix-attributes/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ serde = ["dep:serde", "bstr/serde", "gix-glob/serde", "kstring/serde"]
2020
gix-path = { version = "^0.9.0", path = "../gix-path" }
2121
gix-quote = { version = "^0.4.7", path = "../gix-quote" }
2222
gix-glob = { version = "^0.11.0", path = "../gix-glob" }
23+
gix-trace = { version = "^0.1.3", path = "../gix-trace" }
2324

2425
bstr = { version = "1.3.0", default-features = false, features = ["std", "unicode"]}
2526
smallvec = "1.10.0"
2627
kstring = "2.0.0"
2728
unicode-bom = "2.0.2"
2829
thiserror = "1.0.26"
2930
serde = { version = "1.0.114", optional = true, default-features = false, features = ["derive"]}
30-
log = "0.4.17"
3131

3232
document-features = { version = "0.2.1", optional = true }
3333

gix-attributes/src/search/attributes.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ impl Search {
124124
impl Pattern for Attributes {
125125
type Value = Value;
126126

127-
fn bytes_to_patterns(bytes: &[u8], source: &std::path::Path) -> Vec<pattern::Mapping<Self::Value>> {
127+
fn bytes_to_patterns(bytes: &[u8], _source: &std::path::Path) -> Vec<pattern::Mapping<Self::Value>> {
128128
fn into_owned_assignments<'a>(
129129
attrs: impl Iterator<Item = Result<crate::AssignmentRef<'a>, crate::name::Error>>,
130130
) -> Option<Assignments> {
@@ -138,8 +138,8 @@ impl Pattern for Attributes {
138138
.collect::<Result<Assignments, _>>();
139139
match res {
140140
Ok(res) => Some(res),
141-
Err(err) => {
142-
log::warn!("{}", err);
141+
Err(_err) => {
142+
gix_trace::warn!("{}", _err);
143143
None
144144
}
145145
}
@@ -148,8 +148,8 @@ impl Pattern for Attributes {
148148
crate::parse(bytes)
149149
.filter_map(|res| match res {
150150
Ok(pattern) => Some(pattern),
151-
Err(err) => {
152-
log::warn!("{}: {}", source.display(), err);
151+
Err(_err) => {
152+
gix_trace::warn!("{}: {}", _source.display(), _err);
153153
None
154154
}
155155
})

gix-config/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ gix-sec = { version = "^0.9.0", path = "../gix-sec" }
2424
gix-ref = { version = "^0.35.0", path = "../gix-ref" }
2525
gix-glob = { version = "^0.11.0", path = "../gix-glob" }
2626

27-
log = "0.4.17"
2827
winnow = { version = "0.5.14", features = ["simd"] }
2928
memchr = "2"
3029
thiserror = "1.0.26"

gix-config/src/file/init/from_paths.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ impl File<'static> {
9292
Err(err) => {
9393
let err = Error::Io { source: err, path };
9494
if options.ignore_io_errors {
95-
log::warn!("ignoring: {err:#?}");
95+
gix_features::trace::warn!("ignoring: {err:#?}");
9696
continue;
9797
} else {
9898
return Err(err);
@@ -104,7 +104,7 @@ impl File<'static> {
104104
Ok(_) => {}
105105
Err(err) => {
106106
if options.ignore_io_errors {
107-
log::warn!(
107+
gix_features::trace::warn!(
108108
"ignoring: {:#?}",
109109
Error::Io {
110110
source: err,

gix-config/tests/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ path = "config.rs"
1717
[dev-dependencies]
1818
gix-config = { path = ".."}
1919
gix-testtools = { path = "../../tests/tools"}
20-
gix = { path = "../../gix" }
20+
gix = { path = "../../gix", default-features = false }
2121
gix-ref = { path = "../../gix-ref" }
2222
gix-path = { path = "../../gix-path" }
2323
gix-sec = { path = "../../gix-sec" }

0 commit comments

Comments
 (0)