Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ authors = ["Sebastian Thiel <sebastian.thiel@icloud.com>"]
edition = "2024"
license = "MIT OR Apache-2.0"
version = "0.58.0"
# Rust 1.85 is required so hash-related dependencies can use Rust 2024 crates,
# notably `sha2` 0.11 and `hashbrown` 0.17.
rust-version = "1.85"
# Rust 1.88 is required by `dua-core` 3.3, used for worktree removal.
rust-version = "1.88"
default-run = "gix"
include = ["/src/**/*", "/build.rs", "/LICENSE-*", "/README.md"]
resolver = "2"
Expand Down
8 changes: 4 additions & 4 deletions etc/msrv-badge.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions gitoxide-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,13 @@ crossbeam-channel = { version = "0.5.15", optional = true }
smallvec = { version = "1.15.1", optional = true }

# for 'query' and 'corpus'
rusqlite = { version = "0.40.1", optional = true, features = ["bundled", "fallible_uint"] }
# Specific version needed for MSRV 1.88
rusqlite = { version = "0.39.0", optional = true, features = ["bundled", "fallible_uint"] }

# for 'corpus'
parking_lot = { version = "0.12.4", optional = true }
sysinfo = { version = "0.39.2", optional = true, default-features = false, features = ["system"] }
# Specific version needed for MSRV 1.88
sysinfo = { version = "0.38.3", optional = true, default-features = false, features = ["system"] }
serde_json = { version = "1.0.150", optional = true }
tracing-forest = { version = "0.2.0", features = ["serde"], optional = true }
tracing-subscriber = { version = "0.3.22", optional = true }
Expand Down
21 changes: 7 additions & 14 deletions gitoxide-core/src/remote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use gix::{
protocol::{self, handshake::Ref, transport},
refs::{
Target,
transaction::{Change, LogChange, PreviousValue, RefEdit, RefLog},
transaction::{PreviousValue, RefEdit},
},
};

Expand Down Expand Up @@ -167,17 +167,10 @@ fn ref_to_edit(ref_: &Ref) -> Result<RefEdit, gix::refs::name::Error> {
Ref::Peeled { full_ref_name, tag, .. } => (full_ref_name, Target::Object(*tag)),
Ref::Direct { full_ref_name, object } => (full_ref_name, Target::Object(*object)),
};
Ok(RefEdit {
change: Change::Update {
log: LogChange {
mode: RefLog::AndReference,
force_create_reflog: false,
message: "remote refs".into(),
},
expected: PreviousValue::Any,
new: target,
},
name: name.as_bstr().try_into()?,
deref: false,
})
Ok(RefEdit::update(
name.as_bstr().try_into()?,
target,
PreviousValue::Any,
"remote refs",
))
}
2 changes: 1 addition & 1 deletion gix-actor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repository = "https://github.com/GitoxideLabs/gitoxide"
license = "MIT OR Apache-2.0"
edition = "2024"
include = ["/src/**/*", "/LICENSE-*"]
rust-version = "1.85"
rust-version = "1.88"

[lib]
doctest = true
Expand Down
2 changes: 1 addition & 1 deletion gix-archive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0"
description = "archive generation from of a worktree stream"
authors = ["Sebastian Thiel <sebastian.thiel@icloud.com>"]
edition = "2024"
rust-version = "1.85"
rust-version = "1.88"
include = ["/src/**/*", "/LICENSE-*"]

[lib]
Expand Down
2 changes: 1 addition & 1 deletion gix-attributes/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description = "A crate of the gitoxide project dealing .gitattributes files"
authors = ["Sebastian Thiel <sebastian.thiel@icloud.com>"]
edition = "2024"
include = ["/src/**/*", "/LICENSE-*"]
rust-version = "1.85"
rust-version = "1.88"

[lib]
doctest = true
Expand Down
2 changes: 1 addition & 1 deletion gix-bitmap/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0"
description = "A crate of the gitoxide project dedicated implementing the standard git bitmap format"
authors = ["Sebastian Thiel <sebastian.thiel@icloud.com>"]
edition = "2024"
rust-version = "1.85"
rust-version = "1.88"
include = ["/src/**/*", "/LICENSE-*"]

[lib]
Expand Down
2 changes: 1 addition & 1 deletion gix-blame/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0"
description = "A crate of the gitoxide project dedicated to implementing a 'blame' algorithm"
authors = ["Christoph Rüßler <christoph.ruessler@mailbox.org>", "Sebastian Thiel <sebastian.thiel@icloud.com>"]
edition = "2024"
rust-version = "1.85"
rust-version = "1.88"
include = ["/src/**/*", "/LICENSE-*"]

[features]
Expand Down
54 changes: 26 additions & 28 deletions gix-blame/src/file/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,14 @@ pub fn file(
let commit = find_commit(cache.as_ref(), &odb, &suspect, &mut buf)?;
let commit_time = commit.commit_time()?;

if let Some(since) = options.since {
if commit_time < since.seconds {
if unblamed_to_out_is_done(&mut hunks_to_blame, &mut out, suspect) {
break 'outer;
}

continue;
if let Some(since) = options.since
&& commit_time < since.seconds
{
if unblamed_to_out_is_done(&mut hunks_to_blame, &mut out, suspect) {
break 'outer;
}

continue;
}

let parent_ids: ParentIds = collect_parents(commit, &odb, cache.as_ref(), &mut buf2)?;
Expand Down Expand Up @@ -371,33 +371,31 @@ pub fn file(
}
}

if has_blame_been_passed {
if let Some(ref mut blame_path) = blame_path {
let blame_path_entry = BlamePathEntry {
source_file_path: current_file_path.clone(),
previous_source_file_path: Some(source_location.clone()),
commit_id: suspect,
blob_id: id,
previous_blob_id: source_id,
parent_index: index,
};
blame_path.push(blame_path_entry);
}
if has_blame_been_passed && let Some(ref mut blame_path) = blame_path {
let blame_path_entry = BlamePathEntry {
source_file_path: current_file_path.clone(),
previous_source_file_path: Some(source_location.clone()),
commit_id: suspect,
blob_id: id,
previous_blob_id: source_id,
parent_index: index,
};
blame_path.push(blame_path_entry);
}
}
}
}

hunks_to_blame.retain_mut(|unblamed_hunk| {
if unblamed_hunk.suspects.len() == 1 {
if let Some(entry) = BlameEntry::from_unblamed_hunk(unblamed_hunk, suspect) {
// At this point, we have copied blame for every hunk to a parent. Hunks
// that have only `suspect` left in `suspects` have not passed blame to any
// parent, and so they can be converted to a `BlameEntry` and moved to
// `out`.
out.push(entry);
return false;
}
if unblamed_hunk.suspects.len() == 1
&& let Some(entry) = BlameEntry::from_unblamed_hunk(unblamed_hunk, suspect)
{
// At this point, we have copied blame for every hunk to a parent. Hunks
// that have only `suspect` left in `suspects` have not passed blame to any
// parent, and so they can be converted to a `BlameEntry` and moved to
// `out`.
out.push(entry);
return false;
}
unblamed_hunk.remove_blame(suspect);
true
Expand Down
2 changes: 1 addition & 1 deletion gix-chunk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ documentation = "https://github.com/git/git/blob/seen/Documentation/technical/ch
license = "MIT OR Apache-2.0"
edition = "2024"
include = ["/src/**/*", "/LICENSE-*"]
rust-version = "1.85"
rust-version = "1.88"

[lib]
doctest = true
Expand Down
2 changes: 1 addition & 1 deletion gix-command/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0"
description = "A crate of the gitoxide project handling internal git command execution"
authors = ["Sebastian Thiel <sebastian.thiel@icloud.com>"]
edition = "2024"
rust-version = "1.85"
rust-version = "1.88"
include = ["/src/*.rs", "/LICENSE-*"]

[lib]
Expand Down
8 changes: 4 additions & 4 deletions gix-command/src/prepare.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,10 @@ impl From<Prepare> for Command {
cmd.arg("-c");
if !prep.args.is_empty() {
if !gix_path::os_str_into_bstr(&prep.command).is_ok_and(|cmd| cmd.contains_str("$@")) {
if prep.quote_command {
if let Ok(command) = gix_path::os_str_into_bstr(&prep.command) {
prep.command = gix_path::from_bstring(gix_quote::single(command)).into();
}
if prep.quote_command
&& let Ok(command) = gix_path::os_str_into_bstr(&prep.command)
{
prep.command = gix_path::from_bstring(gix_quote::single(command)).into();
}
prep.command.push(r#" "$@""#);
} else {
Expand Down
2 changes: 1 addition & 1 deletion gix-commitgraph/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description = "Read-only access to the git commitgraph file format"
authors = ["Conor Davis <gitoxide@conor.fastmail.fm>", "Sebastian Thiel <sebastian.thiel@icloud.com>"]
edition = "2024"
include = ["/src/**/*", "/LICENSE-*"]
rust-version = "1.85"
rust-version = "1.88"

[lib]
doctest = false
Expand Down
4 changes: 2 additions & 2 deletions gix-commitgraph/src/file/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ fn read_fan(d: &[u8]) -> ([u32; FAN_LEN], usize) {
assert!(d.len() >= FAN_LEN * 4);

let mut fan = [0; FAN_LEN];
for (c, f) in d.chunks_exact(4).zip(fan.iter_mut()) {
*f = u32::from_be_bytes(c.try_into().unwrap());
for (c, f) in d.as_chunks::<4>().0.iter().zip(fan.iter_mut()) {
*f = u32::from_be_bytes(*c);
}
(fan, FAN_LEN * 4)
}
2 changes: 1 addition & 1 deletion gix-config-value/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0"
description = "A crate of the gitoxide project providing git-config value parsing"
authors = ["Sebastian Thiel <sebastian.thiel@icloud.com>"]
edition = "2024"
rust-version = "1.85"
rust-version = "1.88"
include = ["/src/**/*", "/LICENSE-*"]

[lib]
Expand Down
25 changes: 14 additions & 11 deletions gix-config-value/src/color.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,17 +255,20 @@ impl FromStr for Name {
return Ok(Self::Ansi(v));
}

if let Some(s) = s.strip_prefix('#') {
if s.len() == 6 && s.is_char_boundary(2) && s.is_char_boundary(4) && s.is_char_boundary(6) {
let rgb = (
u8::from_str_radix(&s[..2], 16),
u8::from_str_radix(&s[2..4], 16),
u8::from_str_radix(&s[4..], 16),
);

if let (Ok(r), Ok(g), Ok(b)) = rgb {
return Ok(Self::Rgb(r, g, b));
}
if let Some(s) = s.strip_prefix('#')
&& s.len() == 6
&& s.is_char_boundary(2)
&& s.is_char_boundary(4)
&& s.is_char_boundary(6)
{
let rgb = (
u8::from_str_radix(&s[..2], 16),
u8::from_str_radix(&s[2..4], 16),
u8::from_str_radix(&s[4..], 16),
);

if let (Ok(r), Ok(g), Ok(b)) = rgb {
return Ok(Self::Rgb(r, g, b));
}
}

Expand Down
2 changes: 1 addition & 1 deletion gix-config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ edition = "2024"
keywords = ["git-config", "git", "config", "gitoxide"]
categories = ["config", "parser-implementations"]
include = ["/src/**/*", "/LICENSE-*", "/README.md"]
rust-version = "1.85"
rust-version = "1.88"

[features]
## Enable support for the SHA-1 hash by forwarding the feature to dependencies.
Expand Down
22 changes: 11 additions & 11 deletions gix-config/src/file/includes/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,17 @@ fn resolve_includes_recursive(
let mut paths = None;
if header_name == "include" && header.subsection_name.is_none() {
paths = Some(gather_paths(section, id, backing));
} else if header_name == "includeIf" {
if let Some(condition) = &header.subsection_name {
let target_config_path = section.meta.path.as_deref();
if include_condition_match(
condition.value_in(backing),
target_config_path,
search_config.unwrap_or(target_config),
options.includes,
)? {
paths = Some(gather_paths(section, id, backing));
}
} else if header_name == "includeIf"
&& let Some(condition) = &header.subsection_name
{
let target_config_path = section.meta.path.as_deref();
if include_condition_match(
condition.value_in(backing),
target_config_path,
search_config.unwrap_or(target_config),
options.includes,
)? {
paths = Some(gather_paths(section, id, backing));
}
}
if let Some(paths) = paths {
Expand Down
Loading
Loading