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
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ jobs:
persist-credentials: false
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Setup dependencies
run: |
sudo apt-get update
Expand All @@ -209,6 +211,8 @@ jobs:
persist-credentials: false
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- uses: extractions/setup-just@v3
- name: Run journey tests
run: just ci-journey-tests
Expand All @@ -235,6 +239,8 @@ jobs:
persist-credentials: false
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: cargo check default features
if: startsWith(matrix.os, 'windows')
run: cargo check --workspace --bins --examples
Expand Down Expand Up @@ -284,6 +290,8 @@ jobs:
persist-credentials: false
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- uses: taiki-e/install-action@v2
with:
tool: nextest
Expand Down Expand Up @@ -363,6 +371,8 @@ jobs:
- name: Add Rust tools to path
run: echo "PATH=$HOME/.cargo/bin:$PATH" >> "$GITHUB_ENV"
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- uses: taiki-e/install-action@v2
with:
tool: nextest
Expand All @@ -387,6 +397,8 @@ jobs:
with:
targets: ${{ env.TARGET }}
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- uses: taiki-e/install-action@v2
with:
tool: nextest
Expand Down Expand Up @@ -473,6 +485,8 @@ jobs:
rustup default stable
rustup target add "$TARGET"
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: 'WASI only: crates without feature toggle'
if: endsWith(matrix.target, '-wasi')
run: |
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,7 @@ jobs:
with:
persist-credentials: false
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: stress
run: make stress
12 changes: 0 additions & 12 deletions Cargo.lock

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

3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ authors = ["Sebastian Thiel <sebastian.thiel@icloud.com>"]
edition = "2021"
license = "MIT OR Apache-2.0"
version = "0.45.0"
rust-version = "1.74"
rust-version = "1.82"
default-run = "gix"
include = ["src/**/*", "/build.rs", "LICENSE-*", "README.md"]
resolver = "2"
Expand Down Expand Up @@ -174,7 +174,6 @@ terminal_size = "0.4.2"
# Avoid pre-compiled binaries, see https://github.com/serde-rs/serde/issues/2538 and https://github.com/serde-rs/serde/pull/2590
serde_derive = ">=1.0.185"

once_cell = "1.21.3"
document-features = { version = "0.2.0", optional = true }
[profile.dev.package]
insta.opt-level = 3
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.
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 = "2021"
include = ["src/**/*", "LICENSE-*"]
rust-version = "1.70"
rust-version = "1.82"

[lib]
doctest = false
Expand Down
2 changes: 1 addition & 1 deletion gix-actor/src/signature/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ pub(crate) mod write {

impl From<Error> for std::io::Error {
fn from(err: Error) -> Self {
std::io::Error::new(std::io::ErrorKind::Other, err)
std::io::Error::other(err)
}
}

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 = "2021"
rust-version = "1.70"
rust-version = "1.82"
include = ["src/**/*", "LICENSE-*"]

[lib]
Expand Down
11 changes: 5 additions & 6 deletions gix-archive/src/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,7 @@ where
opts.tree_prefix.as_ref(),
)?;
}
ar.finish()
.map_err(|err| std::io::Error::new(std::io::ErrorKind::Other, err))?;
ar.finish().map_err(std::io::Error::other)?;
}

Ok(())
Expand All @@ -179,25 +178,25 @@ fn append_zip_entry<W: std::io::Write + std::io::Seek>(
let file_opts = zip::write::SimpleFileOptions::default()
.compression_method(zip::CompressionMethod::Deflated)
.compression_level(compression_level)
.large_file(entry.bytes_remaining().map_or(true, |len| len > u32::MAX as usize))
.large_file(entry.bytes_remaining().is_none_or(|len| len > u32::MAX as usize))
.last_modified_time(mtime)
.unix_permissions(if entry.mode.is_executable() { 0o755 } else { 0o644 });
let path = add_prefix(entry.relative_path(), tree_prefix).into_owned();
match entry.mode.kind() {
gix_object::tree::EntryKind::Blob | gix_object::tree::EntryKind::BlobExecutable => {
ar.start_file(path.to_string(), file_opts)
.map_err(|err| std::io::Error::new(std::io::ErrorKind::Other, err))?;
.map_err(std::io::Error::other)?;
std::io::copy(&mut entry, ar)?;
}
gix_object::tree::EntryKind::Tree | gix_object::tree::EntryKind::Commit => {
ar.add_directory(path.to_string(), file_opts)
.map_err(|err| std::io::Error::new(std::io::ErrorKind::Other, err))?;
.map_err(std::io::Error::other)?;
}
gix_object::tree::EntryKind::Link => {
use bstr::ByteSlice;
std::io::copy(&mut entry, buf)?;
ar.add_symlink(path.to_string(), buf.as_bstr().to_string(), file_opts)
.map_err(|err| std::io::Error::new(std::io::ErrorKind::Other, err))?;
.map_err(std::io::Error::other)?;
}
}
Ok(())
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 = "2021"
include = ["src/**/*", "LICENSE-*"]
rust-version = "1.70"
rust-version = "1.82"

[lib]
doctest = false
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 = "2021"
rust-version = "1.70"
rust-version = "1.82"
exclude = ["CHANGELOG.md"]

[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 = "2021"
rust-version = "1.70"
rust-version = "1.82"

[dependencies]
gix-commitgraph = { version = "^0.29.0", path = "../gix-commitgraph" }
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 = "2021"
include = ["src/**/*", "LICENSE-*"]
rust-version = "1.70"
rust-version = "1.82"

[lib]
doctest = false
Expand Down
3 changes: 1 addition & 2 deletions 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 = "2021"
rust-version = "1.70"
rust-version = "1.82"
include = ["src/lib.rs", "LICENSE-*"]

[lib]
Expand All @@ -24,4 +24,3 @@ shell-words = "1.0"

[dev-dependencies]
gix-testtools = { path = "../tests/tools" }
once_cell = "1.21.3"
9 changes: 5 additions & 4 deletions gix-command/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,10 @@ mod prepare {
/// If neither this method nor [`with_shell()`](Self::with_shell()) is called, commands are
/// always executed verbatim and directly, without the use of a shell.
pub fn command_may_be_shell_script(mut self) -> Self {
self.use_shell = self.command.to_str().map_or(true, |cmd| {
cmd.as_bytes().find_byteset(b"|&;<>()$`\\\"' \t\n*?[#~=%").is_some()
});
self.use_shell = self
.command
.to_str()
.is_none_or(|cmd| cmd.as_bytes().find_byteset(b"|&;<>()$`\\\"' \t\n*?[#~=%").is_some());
self
}

Expand Down Expand Up @@ -289,7 +290,7 @@ mod prepare {
let mut cmd = Command::new(shell);
cmd.arg("-c");
if !prep.args.is_empty() {
if prep.command.to_str().map_or(true, |cmd| !cmd.contains("$@")) {
if prep.command.to_str().is_none_or(|cmd| !cmd.contains("$@")) {
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();
Expand Down
4 changes: 2 additions & 2 deletions gix-command/tests/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,9 @@ mod context {
}

mod prepare {
use once_cell::sync::Lazy;
use std::sync::LazyLock;

static SH: Lazy<&'static str> = Lazy::new(|| {
static SH: LazyLock<&'static str> = LazyLock::new(|| {
gix_path::env::shell()
.to_str()
.expect("`prepare` tests must be run where 'sh' path is valid Unicode")
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 = "2021"
include = ["src/**/*", "LICENSE-*"]
rust-version = "1.70"
rust-version = "1.82"

[lib]
doctest = false
Expand Down
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 = "2021"
rust-version = "1.70"
rust-version = "1.82"
include = ["src/**/*", "LICENSE-*"]

[lib]
Expand Down
3 changes: 1 addition & 2 deletions gix-config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ edition = "2021"
keywords = ["git-config", "git", "config", "gitoxide"]
categories = ["config", "parser-implementations"]
include = ["src/**/*", "LICENSE-*", "README.md"]
rust-version = "1.70"
rust-version = "1.82"
autotests = false

[features]
Expand All @@ -33,7 +33,6 @@ unicode-bom = { version = "2.0.3" }
bstr = { version = "1.12.0", default-features = false, features = ["std"] }
serde = { version = "1.0.114", optional = true, default-features = false, features = ["derive"] }
smallvec = "1.15.1"
once_cell = "1.21.3"

document-features = { version = "0.2.0", optional = true }

Expand Down
2 changes: 1 addition & 1 deletion gix-config/src/file/access/mutate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ impl<'event> File<'event> {
nl: &impl AsRef<[u8]>,
) {
if !ends_with_newline(lhs.as_ref(), nl, true)
&& !rhs.first().map_or(true, |e| e.to_bstr_lossy().starts_with(nl.as_ref()))
&& !rhs.first().is_none_or(|e| e.to_bstr_lossy().starts_with(nl.as_ref()))
{
lhs.push(Event::Newline(Cow::Owned(nl.as_ref().into())));
}
Expand Down
Loading
Loading