git_index

Generates arguments to pass to stagit-index in descending order by commit date.
git clone https://git.philomathiclife.com/repos/git_index
Log | Files | Refs | README

commit a5c3c81888cf294b5863a5827663ff349b0a6788
parent 7a93b3c072c30d73fe367ce0a57fd3d05e37d4d9
Author: Zack Newman <zack@philomathiclife.com>
Date:   Mon, 19 May 2025 13:24:43 -0600

update deps

Diffstat:
MCargo.toml | 30+++++++++++++++++++++++++-----
Msrc/main.rs | 50+++++++-------------------------------------------
2 files changed, 32 insertions(+), 48 deletions(-)

diff --git a/Cargo.toml b/Cargo.toml @@ -9,13 +9,33 @@ name = "git_index" readme = "README.md" repository = "https://git.philomathiclife.com/repos/git_index/" rust-version = "1.86.0" -version = "0.1.6" +version = "0.1.7" -[dependencies] -jiff = { version = "0.2.2", default-features = false } +[lints.clippy] +all = { level = "deny", priority = -1 } +cargo = { level = "deny", priority = -1 } +complexity = { level = "deny", priority = -1 } +correctness = { level = "deny", priority = -1 } +nursery = { level = "deny", priority = -1 } +pedantic = { level = "deny", priority = -1 } +perf = { level = "deny", priority = -1 } +restriction = { level = "deny", priority = -1 } +style = { level = "deny", priority = -1 } +suspicious = { level = "deny", priority = -1 } +# Noisy, opinionated, and likely don't prevent bugs or improve APIs. +arbitrary_source_item_ordering = "allow" +blanket_clippy_restriction_lints = "allow" +implicit_return = "allow" +min_ident_chars = "allow" +missing_trait_methods = "allow" +question_mark_used = "allow" +ref_patterns = "allow" +return_and_then = "allow" +single_call_fn = "allow" -[target.'cfg(target_os = "openbsd")'.dependencies] -priv_sep = { version = "2.2.0", default-features = false, features = ["openbsd"] } +[dependencies] +jiff = { version = "0.2.13", default-features = false } +priv_sep = { version = "3.0.0-alpha.1", default-features = false } [profile.release] lto = true diff --git a/src/main.rs b/src/main.rs @@ -1,42 +1,6 @@ //! # `git_index` //! //! Consult [`README.md`](https://git.philomathiclife.com/git_index/file/README.md.html). -#![deny( - future_incompatible, - let_underscore, - missing_docs, - nonstandard_style, - rust_2018_compatibility, - rust_2018_idioms, - rust_2021_compatibility, - rust_2024_compatibility, - unsafe_code, - unused, - unused_crate_dependencies, - warnings, - clippy::all, - clippy::cargo, - clippy::complexity, - clippy::correctness, - clippy::nursery, - clippy::pedantic, - clippy::perf, - clippy::restriction, - clippy::style, - clippy::suspicious -)] -#![expect( - clippy::arbitrary_source_item_ordering, - clippy::blanket_clippy_restriction_lints, - clippy::implicit_return, - clippy::min_ident_chars, - clippy::missing_trait_methods, - clippy::ref_patterns, - clippy::return_and_then, - clippy::question_mark_used, - clippy::single_call_fn, - reason = "noisy, opinionated, and likely doesn't prevent bugs or improve APIs" -)] extern crate alloc; /// Module that parsed passed options into the application. mod args; @@ -51,7 +15,7 @@ use core::{ }; use jiff::{Error as TimeErr, Timestamp, fmt::temporal::DateTimeParser}; #[cfg(target_os = "openbsd")] -use priv_sep::{Permissions, Promise, Promises, UnveilErr}; +use priv_sep::{NulOrIoErr, Permissions, Promise, Promises}; use std::{ ffi::OsString, fs, @@ -71,7 +35,7 @@ enum E { Args(ArgsErr), #[cfg(target_os = "openbsd")] /// Variant for errors due to calls to `unveil`. - Unveil(UnveilErr), + Unveil(NulOrIoErr), /// Variant for IO errors. Io(Error), /// Variant when a git repo directory is not valid UTF-8. @@ -127,8 +91,8 @@ impl From<Error> for E { } } #[cfg(target_os = "openbsd")] -impl From<UnveilErr> for E { - fn from(value: UnveilErr) -> Self { +impl From<NulOrIoErr> for E { + fn from(value: NulOrIoErr) -> Self { Self::Unveil(value) } } @@ -209,7 +173,7 @@ const fn pledge_away_all_but_stdio(_: &mut Zst) -> Result<(), Infallible> { } /// Calls `unveil_none` on `/`. #[cfg(target_os = "openbsd")] -fn veil_all() -> Result<(), UnveilErr> { +fn veil_all() -> Result<(), NulOrIoErr> { Permissions::NONE.unveil("/") } /// No-op that returns `Ok`. @@ -223,7 +187,7 @@ const fn veil_all() -> Result<(), Infallible> { } /// Calls `unveil`_on `GIT` with `Permissions::EXECUTE`. #[cfg(target_os = "openbsd")] -fn unveil_git() -> Result<(), UnveilErr> { +fn unveil_git() -> Result<(), NulOrIoErr> { Permissions::EXECUTE.unveil(GIT) } /// No-op that returns `Ok`. @@ -237,7 +201,7 @@ const fn unveil_git() -> Result<(), Infallible> { } /// Calls `unveil`_on `path` with `Permissions::READ`. #[cfg(target_os = "openbsd")] -fn unveil_read<P: AsRef<Path>>(path: P) -> Result<(), UnveilErr> { +fn unveil_read<P: AsRef<Path>>(path: P) -> Result<(), NulOrIoErr> { Permissions::READ.unveil(path) } /// No-op that returns `Ok`.