Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package git-next for openSUSE:Factory checked in at 2025-07-07 14:47:15 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/git-next (Old) and /work/SRC/openSUSE:Factory/.git-next.new.1903 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "git-next" Mon Jul 7 14:47:15 2025 rev:5 rq:1290955 version:2025.7.1 Changes: -------- --- /work/SRC/openSUSE:Factory/git-next/git-next.changes 2025-05-26 18:39:28.005326956 +0200 +++ /work/SRC/openSUSE:Factory/.git-next.new.1903/git-next.changes 2025-07-07 14:47:18.282292495 +0200 @@ -1,0 +2,9 @@ +Mon Jul 07 05:26:12 UTC 2025 - Johannes Kastl <opensuse_buildserv...@ojkastl.de> + +- Update to version 2025.7.1: + * Fixed + - forgejo auth no longer accepts the token in query path + * Other + - lint fixes and replace/remove allow with expect + +------------------------------------------------------------------- Old: ---- git-next-2025.5.1.obscpio New: ---- git-next-2025.7.1.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ git-next.spec ++++++ --- /var/tmp/diff_new_pack.BZi3hk/_old 2025-07-07 14:47:21.398422594 +0200 +++ /var/tmp/diff_new_pack.BZi3hk/_new 2025-07-07 14:47:21.398422594 +0200 @@ -17,7 +17,7 @@ Name: git-next -Version: 2025.5.1 +Version: 2025.7.1 Release: 0 Summary: Trunk-based development manager for a solo developer License: MIT ++++++ _service ++++++ --- /var/tmp/diff_new_pack.BZi3hk/_old 2025-07-07 14:47:21.442424431 +0200 +++ /var/tmp/diff_new_pack.BZi3hk/_new 2025-07-07 14:47:21.446424598 +0200 @@ -3,7 +3,7 @@ <param name="url">https://codeberg.org/kemitix/git-next.git</param> <param name="scm">git</param> <param name="exclude">.git</param> - <param name="revision">v2025.5.1</param> + <param name="revision">v2025.7.1</param> <param name="versionformat">@PARENT_TAG@</param> <param name="versionrewrite-pattern">v(.*)</param> <param name="changesgenerate">enable</param> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.BZi3hk/_old 2025-07-07 14:47:21.470425600 +0200 +++ /var/tmp/diff_new_pack.BZi3hk/_new 2025-07-07 14:47:21.474425767 +0200 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://codeberg.org/kemitix/git-next.git</param> - <param name="changesrevision">4791a19f9b5afd0c3359736a2c21de12269b8ee8</param></service></servicedata> + <param name="changesrevision">6d4323930ced86a26c5bf7950786fbde09c8bb6d</param></service></servicedata> (No newline at EOF) ++++++ git-next-2025.5.1.obscpio -> git-next-2025.7.1.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/CHANGELOG.md new/git-next-2025.7.1/CHANGELOG.md --- old/git-next-2025.5.1/CHANGELOG.md 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/CHANGELOG.md 2025-07-06 17:58:10.000000000 +0200 @@ -2,6 +2,16 @@ All notable changes to this project will be documented in this file. +## [2025.7.1](https://git.kemitix.net/kemitix/git-next/compare/v2025.5.1...v2025.7.1) - 2025-07-06 + +### Fixed + +- forgejo auth no longer accepts the token in query path + +### Other + +- lint fixes and replace/remove allow with expect + ## [2025.5.1](https://git.kemitix.net/kemitix/git-next/compare/v2025.5.0...v2025.5.1) - 2025-05-25 ### Added diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/Cargo.lock new/git-next-2025.7.1/Cargo.lock --- old/git-next-2025.5.1/Cargo.lock 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/Cargo.lock 2025-07-06 17:58:10.000000000 +0200 @@ -976,7 +976,7 @@ [[package]] name = "git-next" -version = "2025.5.1" +version = "2025.7.1" dependencies = [ "assert2", "async-trait", @@ -998,7 +998,6 @@ "kameo_actors", "kx-utils", "kxio", - "lazy_static", "lettre", "mockall", "notifica", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/Cargo.toml new/git-next-2025.7.1/Cargo.toml --- old/git-next-2025.5.1/Cargo.toml 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/Cargo.toml 2025-07-06 17:58:10.000000000 +0200 @@ -2,7 +2,7 @@ name = "git-next" # year,month.release - using release rather than day allows multiple releases per day if needed -version = "2025.5.1" +version = "2025.7.1" edition = "2021" license = "MIT" @@ -53,7 +53,6 @@ kameo_actors = "0.1" kx-utils = "0.1.3" kxio = "5.1" -lazy_static = "1.5" lettre = { version = "0.11", optional = true, default-features = false, features = [ "builder", "rustls-tls", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/alerts/history.rs new/git-next-2025.7.1/src/alerts/history.rs --- old/git-next-2025.5.1/src/alerts/history.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/alerts/history.rs 2025-07-06 17:58:10.000000000 +0200 @@ -45,6 +45,6 @@ pub fn prune(&mut self, now: &Instant) { if let Some(threshold) = now.checked_sub(self.max_age_seconds) { self.items.retain(|_, last_seen| *last_seen > threshold); - }; + } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/alerts/mod.rs new/git-next-2025.7.1/src/alerts/mod.rs --- old/git-next-2025.5.1/src/alerts/mod.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/alerts/mod.rs 2025-07-06 17:58:10.000000000 +0200 @@ -23,7 +23,6 @@ #[cfg(test)] mod tests; -#[allow(clippy::module_name_repetitions)] #[derive(Debug, Constructor)] pub struct AlertsActor { shout: Option<Shout>, // config for sending alerts to users diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/alerts/webhook.rs new/git-next-2025.7.1/src/alerts/webhook.rs --- old/git-next-2025.5.1/src/alerts/webhook.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/alerts/webhook.rs 2025-07-06 17:58:10.000000000 +0200 @@ -31,7 +31,7 @@ let timestamp = timestamp.unix_timestamp(); let to_sign = format!("{message_id}.{timestamp}.{payload}"); info!(?to_sign, ""); - #[allow(clippy::expect_used)] + #[expect(clippy::expect_used)] let signature = webhook .sign(&message_id, timestamp, payload.to_string().as_ref()) .expect("signature"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/core/config/mod.rs new/git-next-2025.7.1/src/core/config/mod.rs --- old/git-next-2025.5.1/src/core/config/mod.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/core/config/mod.rs 2025-07-06 17:58:10.000000000 +0200 @@ -33,7 +33,6 @@ pub use branch_name::BranchName; pub use commit_count::CommitCount; pub use forge_alias::ForgeAlias; -#[allow(clippy::module_name_repetitions)] pub use forge_config::ForgeConfig; #[cfg(test)] pub use forge_config::ServerRepoConfigMap; @@ -45,13 +44,10 @@ pub use remote_url::RemoteUrl; pub use repo_alias::RepoAlias; pub use repo_branches::RepoBranches; -#[allow(clippy::module_name_repetitions)] pub use repo_config::RepoConfig; pub use repo_config_source::RepoConfigSource; pub use repo_path::RepoPath; -#[allow(clippy::module_name_repetitions)] pub use server_repo_config::ServerRepoConfig; -#[allow(clippy::module_name_repetitions)] pub use user::User; pub use webhook::auth::WebhookAuth; pub use webhook::forge_notification::ForgeNotification; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/core/config/tests.rs new/git-next-2025.7.1/src/core/config/tests.rs --- old/git-next-2025.5.1/src/core/config/tests.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/core/config/tests.rs 2025-07-06 17:58:10.000000000 +0200 @@ -546,7 +546,6 @@ Ok(()) } - #[allow(clippy::too_many_lines)] fn write_app_config(app_config: &AppConfig, fs: &kxio::fs::FileSystem) -> Result<()> { let http = &app_config.listen_socket_addr()?; let http_addr = http.ip(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/core/git/forge/mod.rs new/git-next-2025.7.1/src/core/git/forge/mod.rs --- old/git-next-2025.5.1/src/core/git/forge/mod.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/core/git/forge/mod.rs 2025-07-06 17:58:10.000000000 +0200 @@ -2,7 +2,7 @@ pub mod r#trait; pub mod webhook; -#[allow(clippy::module_name_repetitions)] +#[expect(clippy::module_name_repetitions)] pub use r#trait::ForgeLike; #[cfg(test)] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/core/git/forge/trait.rs new/git-next-2025.7.1/src/core/git/forge/trait.rs --- old/git-next-2025.5.1/src/core/git/forge/trait.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/core/git/forge/trait.rs 2025-07-06 17:58:10.000000000 +0200 @@ -18,7 +18,7 @@ /// Checks if the message should be ignored. /// /// Default implementation says that no messages should be ignored. - #[allow(unused_variables)] + #[expect(unused_variables)] fn should_ignore_message(&self, message: &ForgeNotification) -> bool { false } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/core/git/forge/webhook.rs new/git-next-2025.7.1/src/core/git/forge/webhook.rs --- old/git-next-2025.5.1/src/core/git/forge/webhook.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/core/git/forge/webhook.rs 2025-07-06 17:58:10.000000000 +0200 @@ -3,7 +3,7 @@ #[derive(Debug, thiserror::Error)] pub enum WebhookError { #[error("network")] - Network(#[from] kxio::net::Error), + Network(#[from] Box<kxio::net::Error>), #[error("reqwest")] Reqwest(#[from] kxio::net::RequestError), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/core/git/mod.rs new/git-next-2025.7.1/src/core/git/mod.rs --- old/git-next-2025.5.1/src/core/git/mod.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/core/git/mod.rs 2025-07-06 17:58:10.000000000 +0200 @@ -18,9 +18,9 @@ pub use commit::Commit; pub use forge::ForgeLike; pub use generation::Generation; -#[allow(clippy::module_name_repetitions)] +#[expect(clippy::module_name_repetitions)] pub use git_ref::GitRef; -#[allow(clippy::module_name_repetitions)] +#[expect(clippy::module_name_repetitions)] pub use git_remote::GitRemote; pub use repo_details::RepoDetails; pub use repository::RepositoryFactory; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/core/git/repo_details.rs new/git-next-2025.7.1/src/core/git/repo_details.rs --- old/git-next-2025.5.1/src/core/git/repo_details.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/core/git/repo_details.rs 2025-07-06 17:58:10.000000000 +0200 @@ -90,7 +90,6 @@ format!("https://{user}{auth_delim}{token}@{hostname}/{repo_path}.git").into() } - #[allow(clippy::result_large_err)] pub(crate) fn open(&self) -> Result<impl OpenRepositoryLike, crate::Error> { let git_repo = GitRepository::open(self.gitdir().as_path())?; let repo = RealOpenRepository::builder() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/core/git/repository/factory.rs new/git-next-2025.7.1/src/core/git/repository/factory.rs --- old/git-next-2025.5.1/src/core/git/repository/factory.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/core/git/repository/factory.rs 2025-07-06 17:58:10.000000000 +0200 @@ -11,7 +11,7 @@ use super::open::NonBareRepositoryLike; -#[allow(clippy::module_name_repetitions)] +#[expect(clippy::module_name_repetitions)] #[mockall::automock] pub trait RepositoryFactory: std::fmt::Debug + Sync + Send { fn duplicate(&self) -> Box<dyn RepositoryFactory>; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/core/git/repository/mod.rs new/git-next-2025.7.1/src/core/git/repository/mod.rs --- old/git-next-2025.5.1/src/core/git/repository/mod.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/core/git/repository/mod.rs 2025-07-06 17:58:10.000000000 +0200 @@ -16,7 +16,7 @@ #[cfg(test)] mod test; -#[allow(clippy::module_name_repetitions)] +#[expect(clippy::module_name_repetitions)] pub use factory::RepositoryFactory; #[cfg(test)] @@ -24,7 +24,7 @@ // #[cfg(test)] // #[derive(Clone, Debug)] -// #[allow(clippy::large_enum_variant)] +// #[expect(clippy::large_enum_variant)] // pub enum Repository { // Real, // Test(test::TestRepository), @@ -62,7 +62,7 @@ } #[cfg(test)] -#[allow(clippy::module_name_repetitions)] +#[expect(clippy::module_name_repetitions)] pub trait RepositoryLike { /// Opens the repository. /// diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/core/git/repository/open/mod.rs new/git-next-2025.7.1/src/core/git/repository/open/mod.rs --- old/git-next-2025.5.1/src/core/git/repository/open/mod.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/core/git/repository/open/mod.rs 2025-07-06 17:58:10.000000000 +0200 @@ -17,7 +17,7 @@ use std::path::Path; #[cfg(test)] -#[allow(clippy::module_name_repetitions)] +#[expect(clippy::module_name_repetitions)] #[derive(Debug)] pub enum OpenRepository { // /// A real git repository. @@ -52,8 +52,6 @@ )) } -#[allow(clippy::module_name_repetitions)] -// #[mockall::automock] pub trait NonBareRepositoryLike: OpenRepositoryLike { /// Checkout the branch in the repo fn checkout(&self, branch_name: &BranchName) -> Result<()>; @@ -62,7 +60,7 @@ fn rebase(&self, target_branch_name: &BranchName) -> Result<()>; } -#[allow(clippy::module_name_repetitions)] +#[expect(clippy::module_name_repetitions)] #[mockall::automock] pub trait OpenRepositoryLike: std::fmt::Debug + Send + Sync { /// Returns a `Vec` of all the branches in the remote repo. @@ -143,7 +141,7 @@ /// /// * `target_branch` - The new base branch to rebase onto. /// * `old_base` - The commit or branch that the `<branch>` originally diverged from. - /// Commits reachable from `<old_base>` will not be included in the rebase. + /// Commits reachable from `<old_base>` will not be included in the rebase. /// * `branch` - The branch whose commits are to be rebased. /// /// # Errors diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/core/git/repository/open/otest.rs new/git-next-2025.7.1/src/core/git/repository/open/otest.rs --- old/git-next-2025.5.1/src/core/git/repository/open/otest.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/core/git/repository/open/otest.rs 2025-07-06 17:58:10.000000000 +0200 @@ -101,7 +101,7 @@ .write() .map_err(|_| err!("Lock")) .map(|mut c| *c += 1)?; - #[allow(clippy::expect_used)] + #[expect(clippy::expect_used)] self.on_fetch .get(i) .map(OnFetch::invoke) @@ -121,7 +121,7 @@ .write() .map_err(|_| err!("Lock")) .map(|mut c| *c += 1)?; - #[allow(clippy::expect_used)] + #[expect(clippy::expect_used)] self.on_push .get(i) .map(|f| f.invoke(repo_details, branch_name, to_commit, force)) @@ -150,7 +150,6 @@ } impl TestOpenRepository { - #[allow(unused_variables)] // Allow unused variables due to todo!() placeholder pub(crate) fn new( gitdir: &GitDir, fs: &kxio::fs::FileSystem, @@ -160,7 +159,7 @@ ) -> Self { let pathbuf = fs.base().join(gitdir.to_path_buf()); - #[allow(clippy::expect_used)] + #[expect(clippy::expect_used)] let repo = GitRepository::init(&pathbuf).expect("git init"); Self::write_origin(gitdir, fs); @@ -179,7 +178,7 @@ fn write_origin(gitdir: &GitDir, fs: &kxio::fs::FileSystem) { let config_file = fs.base().join(gitdir.to_path_buf()).join(".git/config"); let file = fs.file(&config_file); - #[allow(clippy::expect_used)] + #[expect(clippy::expect_used)] let contents = s!(file.reader().expect("read original .git/config")); let updated_contents = format!( r#"{contents} @@ -188,7 +187,7 @@ fetch = +refs/heads/*:refs/remotes/origin/* "# ); - #[allow(clippy::expect_used)] + #[expect(clippy::expect_used)] file.write(&updated_contents) .expect("write updated .git/config"); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/core/git/repository/open/tests/fetch.rs new/git-next-2025.7.1/src/core/git/repository/open/tests/fetch.rs --- old/git-next-2025.5.1/src/core/git/repository/open/tests/fetch.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/core/git/repository/open/tests/fetch.rs 2025-07-06 17:58:10.000000000 +0200 @@ -2,7 +2,7 @@ use super::*; #[test] -#[ignore] // requires authentication to the server - which the CI doesn't have +#[ignore = "requires authentication to the server - which the CI doesn't have"] fn should_fetch_from_repo() { // uses the current repo and fetches from the remote server let_assert!(Ok(cwd) = std::env::current_dir()); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/core/git/repository/test.rs new/git-next-2025.7.1/src/core/git/repository/test.rs --- old/git-next-2025.5.1/src/core/git/repository/test.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/core/git/repository/test.rs 2025-07-06 17:58:10.000000000 +0200 @@ -15,7 +15,6 @@ }, }; -#[allow(clippy::module_name_repetitions)] #[derive(Clone, Debug, Constructor)] pub struct TestRepository { fs: kxio::fs::FileSystem, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/core/git/repository/tests/factory.rs new/git-next-2025.7.1/src/core/git/repository/tests/factory.rs --- old/git-next-2025.5.1/src/core/git/repository/tests/factory.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/core/git/repository/tests/factory.rs 2025-07-06 17:58:10.000000000 +0200 @@ -86,7 +86,7 @@ assert!(result.is_ok()); // verify origin in .git/config is unchanged - #[allow(clippy::expect_used)] + #[expect(clippy::expect_used)] let config = s!(fs.file(&fs.base().join("config")).reader().expect("reader")); debug!(%updated_url, config=?config.lines().collect::<Vec<_>>(), "auth"); assert!( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/core/git/tests.rs new/git-next-2025.7.1/src/core/git/tests.rs --- old/git-next-2025.5.1/src/core/git/tests.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/core/git/tests.rs 2025-07-06 17:58:10.000000000 +0200 @@ -331,7 +331,7 @@ create_bare_repo_with_url(path, url); } - #[allow(clippy::unwrap_used)] + #[expect(clippy::unwrap_used)] pub fn a_remote_url() -> RemoteUrl { let hostname = given::a_hostname(); let owner = given::a_name(); @@ -357,7 +357,7 @@ // // echo ${word} > file-${word} // let pathbuf = PathBuf::from(gitdir); // let file = fs.base().join(pathbuf).join(file_name); - // #[allow(clippy::expect_used)] + // #[expect(clippy::expect_used)] // fs.file(&file).write(contents)?; // // git add ${file} // git_add_file(gitdir, &file)?; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/core/git/validation/positions.rs new/git-next-2025.7.1/src/core/git/validation/positions.rs --- old/git-next-2025.5.1/src/core/git/validation/positions.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/core/git/validation/positions.rs 2025-07-06 17:58:10.000000000 +0200 @@ -1,9 +1,8 @@ -use crate::gitlib::Force; -// use crate::prelude::*; use crate::{ core::{git::RepoDetails, BranchName, RepoConfig}, git::{self, repository::open::OpenRepositoryLike, UserNotification}, + gitlib::Force, }; #[derive(Debug)] @@ -22,7 +21,7 @@ /// /// Will return an `Err` if any of the branches has no commits, or if user intervention is /// required, or if there is an error resetting the next branch back to main. -#[allow(clippy::result_large_err)] +#[expect(clippy::result_large_err)] pub fn validate( open_repository: &dyn OpenRepositoryLike, repo_details: &git::RepoDetails, @@ -110,7 +109,6 @@ )) } -#[allow(clippy::result_large_err)] fn reset_next_to_main( open_repository: &dyn OpenRepositoryLike, repo_details: &RepoDetails, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/core/git/validation/tests.rs new/git-next-2025.7.1/src/core/git/validation/tests.rs --- old/git-next-2025.5.1/src/core/git/validation/tests.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/core/git/validation/tests.rs 2025-07-06 17:58:10.000000000 +0200 @@ -359,7 +359,6 @@ assert!(matches!(err, PositionsError::NonRetryable(_))); } #[test] - #[allow(clippy::expect_used)] fn where_dev_branch_is_on_main_and_next_is_not_should_reset_next_branch_to_main_and_retryable_error( ) { //given @@ -444,7 +443,6 @@ } #[test] - #[allow(clippy::expect_used)] fn where_dev_branch_is_not_based_on_next_should_reset_next_branch_to_next_commit_on_dev_and_retryable_error( ) { //given diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/core/mod.rs new/git-next-2025.7.1/src/core/mod.rs --- old/git-next-2025.5.1/src/core/mod.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/core/mod.rs 2025-07-06 17:58:10.000000000 +0200 @@ -1,5 +1,6 @@ mod config; pub mod git; mod macros; +pub mod regexs; pub use config::*; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/core/regexs.rs new/git-next-2025.7.1/src/core/regexs.rs --- old/git-next-2025.5.1/src/core/regexs.rs 1970-01-01 01:00:00.000000000 +0100 +++ new/git-next-2025.7.1/src/core/regexs.rs 2025-07-06 17:58:10.000000000 +0200 @@ -0,0 +1,10 @@ +use regex::Regex; + +#[expect(clippy::unwrap_used)] +pub static RE: std::sync::LazyLock<Regex> = std::sync::LazyLock::new(|| { + Regex::new(r"^(?<pre>.*)\s(?<hash>[0-9a-f]{7})\s\((?<branches>.*?)\)\s(?<message>.*)").unwrap() +}); + +#[expect(clippy::unwrap_used)] +pub static BRANCHES: std::sync::LazyLock<Regex> = + std::sync::LazyLock::new(|| Regex::new(r"origin\/(?<branch>[^,]+)").unwrap()); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/file_watcher.rs new/git-next-2025.7.1/src/file_watcher.rs --- old/git-next-2025.5.1/src/file_watcher.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/file_watcher.rs 2025-07-06 17:58:10.000000000 +0200 @@ -49,7 +49,7 @@ let mut watcher = notify::recommended_watcher(tx).context("file watcher")?; watcher .watch(&this.file, notify::RecursiveMode::NonRecursive) - .with_context(|| format!("Watching: {:?}", this.file))?; + .with_context(|| format!("Watching: {}", this.file.display()))?; this.watcher.replace(watcher); tell!("file_watcher", actor_ref, Watch)?; @@ -65,6 +65,7 @@ impl Message<Watch> for FileWatcherActor { type Reply = MessageResult<()>; + #[expect(clippy::cognitive_complexity)] async fn handle(&mut self, msg: Watch, ctx: &mut Context<Self, Self::Reply>) -> Self::Reply { if let Some(rx) = &self.event_receiver { while let Ok(result) = rx.recv() { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/forge/tests.rs new/git-next-2025.7.1/src/forge/tests.rs --- old/git-next-2025.5.1/src/forge/tests.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/forge/tests.rs 2025-07-06 17:58:10.000000000 +0200 @@ -28,7 +28,6 @@ mock_net.assert_no_unused_plans(); } -#[allow(dead_code)] fn given_repo_details(forge_type: crate::core::ForgeType) -> RepoDetails { let fs = kxio::fs::temp().unwrap_or_else(|e| { println!("{e}"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/forges/forgejo/mod.rs new/git-next-2025.7.1/src/forges/forgejo/mod.rs --- old/git-next-2025.5.1/src/forges/forgejo/mod.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/forges/forgejo/mod.rs 2025-07-06 17:58:10.000000000 +0200 @@ -64,11 +64,15 @@ let api_token = &repo_details.forge.token(); use secrecy::ExposeSecret; let token = api_token.expose_secret(); - let url = format!( - "https://{hostname}/api/v1/repos/{repo_path}/commits/{commit}/status?token={token}" - ); + let url = format!("https://{hostname}/api/v1/repos/{repo_path}/commits/{commit}/status"); - let Ok(response) = self.net.get(url).send().await else { + let Ok(response) = self + .net + .get(url) + .header("Authorization", format!("token {token}")) + .send() + .await + else { return Ok(Status::Pending); }; let combined_status = response.json::<CombinedStatus>().await.unwrap_or_default(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/forges/forgejo/tests.rs new/git-next-2025.7.1/src/forges/forgejo/tests.rs --- old/git-next-2025.5.1/src/forges/forgejo/tests.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/forges/forgejo/tests.rs 2025-07-06 17:58:10.000000000 +0200 @@ -204,11 +204,13 @@ async fn should_return_pending_for_no_statuses() { let fs = given::a_filesystem(); let repo_details = given::repo_details(&fs); + let token = repo_details.forge.token().expose_secret(); let commit = given::a_commit(); let mock_net = given::a_network(); mock_net .on() .get(given::a_commit_status_url(&repo_details, &commit)) + .header("authorization", format!("token {token}")) .respond(StatusCode::OK) .body( json!({ @@ -228,11 +230,13 @@ async fn should_return_pending_for_network_error() { let fs = given::a_filesystem(); let repo_details = given::repo_details(&fs); + let token = repo_details.forge.token().expose_secret(); let commit = given::a_commit(); let mock_net = given::a_network(); mock_net .on() .get(given::a_commit_status_url(&repo_details, &commit)) + .header("authorization", format!("token {token}")) .respond(StatusCode::INTERNAL_SERVER_ERROR) .body("book today") .expect("mock"); @@ -307,8 +311,9 @@ mock_net .on() .get(format!( - "https://{hostname}/api/v1/repos/{repo_path}/hooks?page=1&token={token}" + "https://{hostname}/api/v1/repos/{repo_path}/hooks?page=1" )) + .header("authorization", format!("token {token}")) .respond(StatusCode::INTERNAL_SERVER_ERROR) .body("error_message") .expect("mock"); @@ -336,8 +341,9 @@ mock_net .on() .delete(format!( - "https://{hostname}/api/v1/repos/{repo_path}/hooks/{webhook_id}?token={token}" + "https://{hostname}/api/v1/repos/{repo_path}/hooks/{webhook_id}" )) + .header("authorization", format!("token {token}")) .respond(StatusCode::OK) .body("") .expect("mock"); @@ -361,8 +367,9 @@ mock_net .on() .delete(format!( - "https://{hostname}/api/v1/repos/{repo_path}/hooks/{webhook_id}?token={token}" + "https://{hostname}/api/v1/repos/{repo_path}/hooks/{webhook_id}" )) + .header("authorization", format!("token {token}")) .respond(StatusCode::INTERNAL_SERVER_ERROR) .body("error") .expect("mock"); @@ -411,9 +418,8 @@ let webhook_id = given::a_forgejo_webhook_id(); mock_net .on() - .post(format!( - "https://{hostname}/api/v1/repos/{repo_path}/hooks?token={token}" - )) + .post(format!("https://{hostname}/api/v1/repos/{repo_path}/hooks")) + .header("authorization", format!("token {token}")) .respond(StatusCode::OK) .body(json!({"id": webhook_id, "config":{}}).to_string()) .expect("mock"); @@ -488,9 +494,8 @@ let webhook_id = given::a_forgejo_webhook_id(); mock_net .on() - .post(format!( - "https://{hostname}/api/v1/repos/{repo_path}/hooks?token={token}" - )) + .post(format!("https://{hostname}/api/v1/repos/{repo_path}/hooks")) + .header("authorization", format!("token {token}")) .respond(StatusCode::OK) .body(json!({"id": webhook_id, "config":{}}).to_string()) .expect("mock"); @@ -531,9 +536,8 @@ // register the webhook will return empty response mock_net .on() - .post(format!( - "https://{hostname}/api/v1/repos/{repo_path}/hooks?token={token}" - )) + .post(format!("https://{hostname}/api/v1/repos/{repo_path}/hooks")) + .header("authorization", format!("token {token}")) .respond(StatusCode::OK) .body(json!({}).to_string()) // empty response) .expect("mock"); @@ -577,6 +581,7 @@ .post(format!( "https://{hostname}/api/v1/repos/{repo_path}/hooks?token={token}" )) + .header("authorization", format!("token {token}")) .respond(StatusCode::INTERNAL_SERVER_ERROR) .body("error") .expect("mock"); @@ -606,8 +611,9 @@ args.mock_net .on() .get(format!( - "https://{hostname}/api/v1/repos/{repo_path}/hooks?page={page}&token={token}" + "https://{hostname}/api/v1/repos/{repo_path}/hooks?page={page}" )) + .header("authorization", format!("token {token}")) .respond(StatusCode::OK) .body(json!(response).to_string()) .expect("mock"); @@ -620,8 +626,9 @@ args.mock_net .on() .delete(format!( - "https://{hostname}/api/v1/repos/{repo_path}/hooks/{webhook_id}?token={token}" + "https://{hostname}/api/v1/repos/{repo_path}/hooks/{webhook_id}" )) + .header("authorization", format!("token {token}")) .respond(StatusCode::OK) .body("") .expect("mock"); @@ -666,8 +673,10 @@ repo_details: &git::RepoDetails, commit: &git::Commit, ) { + let token = repo_details.forge.token().expose_secret(); net.on() .get(a_commit_status_url(repo_details, commit)) + .header("authorization", format!("token {token}")) .respond(StatusCode::OK) .body((json!({"state":state.as_ref()})).to_string()) .expect("mock"); @@ -679,10 +688,7 @@ ) -> String { let hostname = repo_details.forge.hostname(); let repo_path = &repo_details.repo_path; - let token = repo_details.forge.token().expose_secret(); - format!( - "https://{hostname}/api/v1/repos/{repo_path}/commits/{commit}/status?token={token}" - ) + format!("https://{hostname}/api/v1/repos/{repo_path}/commits/{commit}/status") } pub enum Header { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/forges/forgejo/webhook/list.rs new/git-next-2025.7.1/src/forges/forgejo/webhook/list.rs --- old/git-next-2025.5.1/src/forges/forgejo/webhook/list.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/forges/forgejo/webhook/list.rs 2025-07-06 17:58:10.000000000 +0200 @@ -1,8 +1,9 @@ -// -use crate::core::{git, server::RepoListenUrl, WebhookId}; use kxio::net::Net; -use crate::forges::forgejo::webhook::Hook; +use crate::{ + core::{git, server::RepoListenUrl, WebhookId}, + forges::forgejo::webhook::Hook, +}; pub async fn list( repo_details: &git::RepoDetails, @@ -18,8 +19,9 @@ let token = &repo_details.forge.token().expose_secret(); match net .get(format!( - "https://{hostname}/api/v1/repos/{repo_path}/hooks?page={page}&token={token}" + "https://{hostname}/api/v1/repos/{repo_path}/hooks?page={page}" )) + .header("Authorization", format!("token {token}")) .send() .await { @@ -39,7 +41,7 @@ } } Err(e) => { - return Err(git::forge::webhook::WebhookError::Network(e)); + return Err(git::forge::webhook::WebhookError::Network(Box::new(e))); } }; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/forges/forgejo/webhook/register.rs new/git-next-2025.7.1/src/forges/forgejo/webhook/register.rs --- old/git-next-2025.5.1/src/forges/forgejo/webhook/register.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/forges/forgejo/webhook/register.rs 2025-07-06 17:58:10.000000000 +0200 @@ -32,11 +32,12 @@ let hostname = &repo_details.forge.hostname(); let repo_path = &repo_details.repo_path; let token = repo_details.forge.token().expose_secret(); - let url = format!("https://{hostname}/api/v1/repos/{repo_path}/hooks?token={token}"); + let url = format!("https://{hostname}/api/v1/repos/{repo_path}/hooks"); let authorisation = WebhookAuth::generate(); match net .post(url) .header("Content-Type", "application/json") + .header("Authorization", format!("token {token}")) .body(json!({ "active": true, "authorization_header": authorisation.header_value(), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/forges/forgejo/webhook/unregister.rs new/git-next-2025.7.1/src/forges/forgejo/webhook/unregister.rs --- old/git-next-2025.5.1/src/forges/forgejo/webhook/unregister.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/forges/forgejo/webhook/unregister.rs 2025-07-06 17:58:10.000000000 +0200 @@ -15,8 +15,9 @@ let token = repo_details.forge.token().expose_secret(); match net .delete(format!( - "https://{hostname}/api/v1/repos/{repo_path}/hooks/{webhook_id}?token={token}" + "https://{hostname}/api/v1/repos/{repo_path}/hooks/{webhook_id}" )) + .header("Authorization", format!("token {token}")) .send() .await { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/forges/github/webhook/list.rs new/git-next-2025.7.1/src/forges/github/webhook/list.rs --- old/git-next-2025.5.1/src/forges/github/webhook/list.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/forges/github/webhook/list.rs 2025-07-06 17:58:10.000000000 +0200 @@ -47,8 +47,8 @@ } }, Err(e) => { - return Err(git::forge::webhook::WebhookError::Network(e)); + return Err(git::forge::webhook::WebhookError::Network(Box::new(e))); } - }; + } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/forges/github/webhook/register.rs new/git-next-2025.7.1/src/forges/github/webhook/register.rs --- old/git-next-2025.5.1/src/forges/github/webhook/register.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/forges/github/webhook/register.rs 2025-07-06 17:58:10.000000000 +0200 @@ -15,7 +15,7 @@ let repo_details = &github.repo_details; if repo_details.repo_config.is_none() { return Err(git::forge::webhook::WebhookError::NoRepoConfig); - }; + } // remove any lingering webhooks for the same URL let existing_webhook_ids = webhook::list(github, repo_listen_url).await?; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/gitlib/git_repository.rs new/git-next-2025.7.1/src/gitlib/git_repository.rs --- old/git-next-2025.5.1/src/gitlib/git_repository.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/gitlib/git_repository.rs 2025-07-06 17:58:10.000000000 +0200 @@ -117,7 +117,7 @@ super::GitUrl::from(url).try_into() } - #[allow(clippy::cognitive_complexity)] + #[expect(clippy::cognitive_complexity)] pub fn commit_log( &self, branch_name: &BranchName, @@ -303,7 +303,7 @@ Ok(()) }); push_options.remote_callbacks(callbacks); - }; + } let mut remote = repo .find_remote("origin") @@ -359,10 +359,10 @@ Ok(()) } - #[allow(clippy::too_many_lines)] + #[expect(clippy::too_many_lines)] pub fn rebase_onto(&self, new_base: &str, old_base: &str, branch: &str) -> Result<()> { debug!("Rebasing branch '{branch}' onto '{new_base}' (old base: '{old_base}') via gitlib"); - #[allow(clippy::cognitive_complexity)] + #[expect(clippy::cognitive_complexity)] self.0.lock().map_err(|_| err!(LockError)).and_then(|repo| { let commit_new = repo .revparse_single(new_base) @@ -579,7 +579,7 @@ let parent_ref = repo.find_reference(&branch_ref_name)?; let parent_commit = parent_ref.peel_to_commit()?; let mut index = repo.index()?; - #[allow(clippy::expect_used)] + #[expect(clippy::expect_used)] let workdir = repo.workdir().expect("git workdir"); let absolute_path = workdir.join(file_path); if let Some(parent_dir) = absolute_path.parent() { @@ -618,7 +618,7 @@ use super::*; - #[allow(clippy::cognitive_complexity)] + #[expect(clippy::cognitive_complexity)] fn create_test_repo_with_remote() -> Result<(RemoteTestSetup, GitRepository, Commit)> { let setup = RemoteTestSetup::new()?; let repo = setup.clone_local_repo()?; @@ -750,7 +750,7 @@ use super::*; // Compile-time interface verification - #[allow(dead_code)] + #[expect(dead_code)] fn test_clone_interface() { let _ = |repo_details: &RepoDetails| -> Result<GitRepository, GitCloneError> { GitRepository::clone(repo_details) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/gitlib/test_helpers.rs new/git-next-2025.7.1/src/gitlib/test_helpers.rs --- old/git-next-2025.5.1/src/gitlib/test_helpers.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/gitlib/test_helpers.rs 2025-07-06 17:58:10.000000000 +0200 @@ -25,7 +25,7 @@ /// - The directory for the repository cannot be created (implicitly by `init_bare`). /// - The Git repository cannot be initialized at the specified path (`git2::Repository::init_bare`). /// - The 'origin' remote cannot be created or its URL cannot be set (`repo.remote`). -#[allow(clippy::expect_used)] +#[expect(clippy::expect_used)] pub fn create_bare_repo_with_url(path: &Path, url: &str) { // Create a new bare repository at the specified path. // This handles the creation of the necessary directory structure. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/init.rs new/git-next-2025.7.1/src/init.rs --- old/git-next-2025.5.1/src/init.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/init.rs 2025-07-06 17:58:10.000000000 +0200 @@ -7,14 +7,20 @@ if fs .path(&pathbuf) .exists() - .with_context(|| format!("Checking for existing file: {pathbuf:?}"))? + .with_context(|| format!("Checking for existing file: {}", pathbuf.display()))? { - eprintln!("The configuration file already exists at {pathbuf:?} - not overwritting it.",); + eprintln!( + "The configuration file already exists at {} - not overwritting it.", + pathbuf.display() + ); } else { fs.file(&pathbuf) .write(include_str!("../default.toml")) - .with_context(|| format!("Writing file: {pathbuf:?}"))?; - println!("Created a default configuration file at {pathbuf:?}"); + .with_context(|| format!("Writing file: {}", pathbuf.display()))?; + println!( + "Created a default configuration file at {}", + pathbuf.display() + ); } Ok(()) } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/repo/branch.rs new/git-next-2025.7.1/src/repo/branch.rs --- old/git-next-2025.5.1/src/repo/branch.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/repo/branch.rs 2025-07-06 17:58:10.000000000 +0200 @@ -67,7 +67,7 @@ } } -#[allow(clippy::cognitive_complexity)] +#[expect(clippy::cognitive_complexity)] pub fn find_next_commit_on_dev( next: &Commit, main: &Commit, @@ -90,14 +90,14 @@ for commit in dev_commit_history { if commit == next { break; - }; + } if commit == main { debug!("Found main commit in dev history before next, will use force push"); force = Force::ForceWithLease { expected_sha: next.sha().to_string(), }; break; - }; + } next_commit.replace(commit); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/repo/handlers/rebase_dev_on_main.rs new/git-next-2025.7.1/src/repo/handlers/rebase_dev_on_main.rs --- old/git-next-2025.5.1/src/repo/handlers/rebase_dev_on_main.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/repo/handlers/rebase_dev_on_main.rs 2025-07-06 17:58:10.000000000 +0200 @@ -15,6 +15,7 @@ impl Message<RebaseDevOnMain> for RepoActor { type Reply = Result<()>; + #[expect(clippy::cognitive_complexity)] async fn handle( &mut self, _msg: RebaseDevOnMain, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/repo/handlers/receive_ci_status.rs new/git-next-2025.7.1/src/repo/handlers/receive_ci_status.rs --- old/git-next-2025.5.1/src/repo/handlers/receive_ci_status.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/repo/handlers/receive_ci_status.rs 2025-07-06 17:58:10.000000000 +0200 @@ -15,6 +15,7 @@ impl Message<ReceiveCIStatus> for RepoActor { type Reply = Result<()>; + #[expect(clippy::cognitive_complexity)] async fn handle( &mut self, msg: ReceiveCIStatus, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/repo/handlers/register_webhook.rs new/git-next-2025.7.1/src/repo/handlers/register_webhook.rs --- old/git-next-2025.5.1/src/repo/handlers/register_webhook.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/repo/handlers/register_webhook.rs 2025-07-06 17:58:10.000000000 +0200 @@ -15,6 +15,7 @@ impl Message<RegisterWebhook> for RepoActor { type Reply = Result<()>; + #[expect(clippy::cognitive_complexity)] async fn handle( &mut self, _msg: RegisterWebhook, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/repo/handlers/unregister_webhook.rs new/git-next-2025.7.1/src/repo/handlers/unregister_webhook.rs --- old/git-next-2025.5.1/src/repo/handlers/unregister_webhook.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/repo/handlers/unregister_webhook.rs 2025-07-06 17:58:10.000000000 +0200 @@ -10,6 +10,7 @@ impl Message<UnRegisterWebhook> for RepoActor { type Reply = Result<()>; + #[expect(clippy::cognitive_complexity)] async fn handle( &mut self, _msg: UnRegisterWebhook, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/repo/mod.rs new/git-next-2025.7.1/src/repo/mod.rs --- old/git-next-2025.5.1/src/repo/mod.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/repo/mod.rs 2025-07-06 17:58:10.000000000 +0200 @@ -58,7 +58,6 @@ /// An actor that represents a Git Repository. /// /// When this actor is started it is sent the `CloneRepo` message. -#[allow(clippy::module_name_repetitions)] #[derive(Debug, derive_more::Display, derive_with::With)] #[display("{}:{}:{}", generation, repo_details.forge.forge_alias(), repo_details.repo_alias)] pub struct RepoActor { @@ -82,7 +81,7 @@ server_actor_ref: ActorRef<ServerActor>, } impl RepoActor { - #[allow(clippy::too_many_arguments)] + #[expect(clippy::too_many_arguments)] pub fn new( server_mode: ServerMode, repo_details: git::RepoDetails, @@ -129,13 +128,11 @@ Ok(()) } - #[allow(unused_variables)] async fn update_tui_log(&self, log: git::graph::Log) -> Result<()> { self.post_repo_update(RepoUpdate::Log { log }).await?; Ok(()) } - #[allow(unused_variables)] async fn alert_tui(&self, alert: impl Into<String> + Send) -> Result<()> { self.post_repo_update(RepoUpdate::Alert { alert: alert.into(), @@ -144,7 +141,6 @@ Ok(()) } - #[allow(unused_variables)] #[instrument(skip_all)] async fn post_repo_update(&self, repo_update: RepoUpdate) -> Result<()> { match self.server_mode { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/repo/tests/given.rs new/git-next-2025.7.1/src/repo/tests/given.rs --- old/git-next-2025.5.1/src/repo/tests/given.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/repo/tests/given.rs 2025-07-06 17:58:10.000000000 +0200 @@ -143,7 +143,7 @@ } pub fn a_filesystem() -> kxio::fs::TempFileSystem { - #[allow(clippy::expect_used)] + #[expect(clippy::expect_used)] kxio::fs::temp().expect("temp fs") } @@ -178,7 +178,6 @@ MessageToken::default() } -#[allow(clippy::unnecessary_box_returns)] pub fn a_forge() -> Box<MockForgeLike> { Box::new(MockForgeLike::new()) } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/repo/tests/handlers/advance_main.rs new/git-next-2025.7.1/src/repo/tests/handlers/advance_main.rs --- old/git-next-2025.5.1/src/repo/tests/handlers/advance_main.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/repo/tests/handlers/advance_main.rs 2025-07-06 17:58:10.000000000 +0200 @@ -11,7 +11,7 @@ let (mut open_repository, mut repo_details) = given::an_open_repository(&fs); // config from repo - #[allow(clippy::unwrap_used)] + #[expect(clippy::unwrap_used)] let repo_config = repo_details.repo_config.take().unwrap(); repo_details.repo_config = Some(repo_config.with_source(RepoConfigSource::Repo)); @@ -56,7 +56,7 @@ let (mut open_repository, mut repo_details) = given::an_open_repository(&fs); // config from server - #[allow(clippy::unwrap_used)] + #[expect(clippy::unwrap_used)] let repo_config = repo_details.repo_config.take().unwrap(); repo_details.repo_config = Some(repo_config.with_source(RepoConfigSource::Server)); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/repo/tests/handlers/clone_repo.rs new/git-next-2025.7.1/src/repo/tests/handlers/clone_repo.rs --- old/git-next-2025.5.1/src/repo/tests/handlers/clone_repo.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/repo/tests/handlers/clone_repo.rs 2025-07-06 17:58:10.000000000 +0200 @@ -10,7 +10,7 @@ //given let fs = given::a_filesystem(); let (mut open_repository, /* mut */ repo_details) = given::an_open_repository(&fs); - // #[allow(clippy::unwrap_used)] + // #[expect(clippy::unwrap_used)] // let repo_config = repo_details.repo_config.take().unwrap(); given::has_all_valid_remote_defaults(&mut open_repository, &repo_details); @@ -106,7 +106,7 @@ .expect_fetch() .times(1) .return_once(|| Ok(())); - #[allow(clippy::unwrap_used)] + #[expect(clippy::unwrap_used)] let _repo_config = repo_details.repo_config.take().unwrap(); given::has_all_valid_remote_defaults(&mut open_repository, &repo_details); @@ -145,7 +145,6 @@ .expect_fetch() .times(1) .return_once(|| Ok(())); - #[allow(clippy::unwrap_used)] given::has_all_valid_remote_defaults(&mut open_repository, &repo_details); let mut repository_factory = MockRepositoryFactory::new(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/repo/tests/handlers/validate_repo.rs new/git-next-2025.7.1/src/repo/tests/handlers/validate_repo.rs --- old/git-next-2025.5.1/src/repo/tests/handlers/validate_repo.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/repo/tests/handlers/validate_repo.rs 2025-07-06 17:58:10.000000000 +0200 @@ -15,7 +15,7 @@ //given let fs = given::a_filesystem(); let (mut open_repository, repo_details) = given::an_open_repository(&fs); - #[allow(clippy::unwrap_used)] + #[expect(clippy::unwrap_used)] let repo_config = repo_details.repo_config.clone().unwrap(); expect::fetch_ok(&mut open_repository); let branches = repo_config.branches(); @@ -63,7 +63,7 @@ //given let fs = given::a_filesystem(); let (mut open_repository, repo_details) = given::an_open_repository(&fs); - #[allow(clippy::unwrap_used)] + #[expect(clippy::unwrap_used)] let repo_config = repo_details.repo_config.clone().unwrap(); expect::fetch_ok(&mut open_repository); let branches = repo_config.branches(); @@ -118,7 +118,7 @@ //given let fs = given::a_filesystem(); let (mut open_repository, repo_details) = given::an_open_repository(&fs); - #[allow(clippy::unwrap_used)] + #[expect(clippy::unwrap_used)] let repo_config = repo_details.repo_config.clone().unwrap(); expect::fetch_ok(&mut open_repository); let branches = repo_config.branches(); @@ -163,7 +163,7 @@ //given let fs = given::a_filesystem(); let (mut open_repository, repo_details) = given::an_open_repository(&fs); - #[allow(clippy::unwrap_used)] + #[expect(clippy::unwrap_used)] let repo_config = repo_details.repo_config.clone().unwrap(); // given::has_all_valid_remote_defaults(&mut open_repository, &repo_details); expect::fetch_ok(&mut open_repository); @@ -208,7 +208,7 @@ //given let fs = given::a_filesystem(); let (mut open_repository, repo_details) = given::an_open_repository(&fs); - #[allow(clippy::unwrap_used)] + #[expect(clippy::unwrap_used)] let repo_config = repo_details.repo_config.clone().unwrap(); // Validate repo branches expect::fetch_ok(&mut open_repository); @@ -253,7 +253,7 @@ //given let fs = given::a_filesystem(); let (mut open_repository, repo_details) = given::an_open_repository(&fs); - #[allow(clippy::unwrap_used)] + #[expect(clippy::unwrap_used)] let repo_config = repo_details.repo_config.clone().unwrap(); // Validate repo branches expect::fetch_ok(&mut open_repository); @@ -296,7 +296,7 @@ //given let fs = given::a_filesystem(); let (mut open_repository, repo_details) = given::an_open_repository(&fs); - #[allow(clippy::unwrap_used)] + #[expect(clippy::unwrap_used)] let repo_config = repo_details.repo_config.clone().unwrap(); // Validate repo branches expect::fetch_ok(&mut open_repository); @@ -347,7 +347,7 @@ //given let fs = given::a_filesystem(); let (mut open_repository, repo_details) = given::an_open_repository(&fs); - #[allow(clippy::unwrap_used)] + #[expect(clippy::unwrap_used)] let repo_config = repo_details.repo_config.clone().unwrap(); // Validate repo branches expect::fetch_ok(&mut open_repository); @@ -494,7 +494,7 @@ //given let fs = given::a_filesystem(); let (mut open_repository, repo_details) = given::an_open_repository(&fs); - #[allow(clippy::unwrap_used)] + #[expect(clippy::unwrap_used)] let repo_config = repo_details.repo_config.clone().unwrap(); open_repository.expect_fetch().return_once(|| Ok(())); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/server/actor/handlers/receive_app_config.rs new/git-next-2025.7.1/src/server/actor/handlers/receive_app_config.rs --- old/git-next-2025.5.1/src/server/actor/handlers/receive_app_config.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/server/actor/handlers/receive_app_config.rs 2025-07-06 17:58:10.000000000 +0200 @@ -13,7 +13,6 @@ impl Message<ReceiveAppConfig> for ServerActor { type Reply = Result<()>; - #[allow(clippy::cognitive_complexity)] async fn handle( &mut self, msg: ReceiveAppConfig, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/server/actor/handlers/receive_valid_app_config.rs new/git-next-2025.7.1/src/server/actor/handlers/receive_valid_app_config.rs --- old/git-next-2025.5.1/src/server/actor/handlers/receive_valid_app_config.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/server/actor/handlers/receive_valid_app_config.rs 2025-07-06 17:58:10.000000000 +0200 @@ -21,6 +21,7 @@ impl Message<ReceiveValidAppConfig> for ServerActor { type Reply = Result<()>; + #[expect(clippy::cognitive_complexity)] async fn handle( &mut self, msg: ReceiveValidAppConfig, @@ -85,11 +86,11 @@ "server", ctx.actor_ref(), ServerUpdate::AppConfigLoaded { - app_config: ValidAppConfig { + app_config: Box::new(ValidAppConfig { app_config, socket_address, storage: server_storage, - }, + }), } )?; tell!("alert", self.alerts, UpdateShout::new(shout))?; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/server/actor/handlers/shutdown.rs new/git-next-2025.7.1/src/server/actor/handlers/shutdown.rs --- old/git-next-2025.5.1/src/server/actor/handlers/shutdown.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/server/actor/handlers/shutdown.rs 2025-07-06 17:58:10.000000000 +0200 @@ -10,6 +10,7 @@ impl Message<Shutdown> for ServerActor { type Reply = Result<()>; + #[expect(clippy::cognitive_complexity)] async fn handle( &mut self, _msg: Shutdown, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/server/actor/messages.rs new/git-next-2025.7.1/src/server/actor/messages.rs --- old/git-next-2025.5.1/src/server/actor/messages.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/server/actor/messages.rs 2025-07-06 17:58:10.000000000 +0200 @@ -46,11 +46,10 @@ message!(Shutdown, "Notification to shutdown the server actor"); -#[allow(clippy::large_enum_variant)] #[derive(Clone, Debug)] pub enum ServerUpdate { /// List of all configured forges and aliases - AppConfigLoaded { app_config: ValidAppConfig }, + AppConfigLoaded { app_config: Box<ValidAppConfig> }, RepoUpdate { forge_alias: ForgeAlias, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/server/actor/mod.rs new/git-next-2025.7.1/src/server/actor/mod.rs --- old/git-next-2025.5.1/src/server/actor/mod.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/server/actor/mod.rs 2025-07-06 17:58:10.000000000 +0200 @@ -35,7 +35,7 @@ mod handlers; pub mod messages; -#[allow(clippy::module_name_repetitions)] +#[expect(clippy::module_name_repetitions)] #[derive(derive_with::With)] #[with(message_log)] pub struct ServerActor { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/server/actor/tests/given.rs new/git-next-2025.7.1/src/server/actor/tests/given.rs --- old/git-next-2025.5.1/src/server/actor/tests/given.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/server/actor/tests/given.rs 2025-07-06 17:58:10.000000000 +0200 @@ -6,7 +6,7 @@ use crate::alerts::{AlertsActor, History}; pub fn a_filesystem() -> kxio::fs::TempFileSystem { - #[allow(clippy::expect_used)] + #[expect(clippy::expect_used)] kxio::fs::temp().expect("temp fs") } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/server/mod.rs new/git-next-2025.7.1/src/server/mod.rs --- old/git-next-2025.5.1/src/server/mod.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/server/mod.rs 2025-07-06 17:58:10.000000000 +0200 @@ -24,19 +24,24 @@ if fs .path(&pathbuf) .exists() - .with_context(|| format!("Checking for existing file: {pathbuf:?}"))? + .with_context(|| format!("Checking for existing file: {}", pathbuf.display()))? { - eprintln!("The configuration file already exists at {pathbuf:?} - not overwritting it.",); + eprintln!( + "The configuration file already exists at {} - not overwritting it.", + pathbuf.display() + ); } else { fs.file(&pathbuf) .write(include_str!("server-default.toml")) - .with_context(|| format!("Writing file: {pathbuf:?}"))?; - println!("Created a default configuration file at {pathbuf:?}",); + .with_context(|| format!("Writing file: {}", pathbuf.display()))?; + println!( + "Created a default configuration file at {}", + pathbuf.display() + ); } Ok(()) } -#[allow(clippy::too_many_lines)] pub fn start( server_mode: ServerMode, fs: &FileSystem, @@ -47,12 +52,11 @@ match server_mode { ServerMode::Simple => init_logging(), ServerMode::LegacyUI | ServerMode::NewUI => crate::tui::logging::initialize_logging()?, - }; + } let shutdown_message_holder: Arc<RwLock<Option<String>>> = Arc::new(RwLock::new(None)); let shutdown_message_holder_clone = shutdown_message_holder.clone(); - #[allow(clippy::expect_used)] tokio::runtime::Runtime::new()?.block_on(async { let (tx_shutdown, mut rx_shutdown) = tokio::sync::mpsc::channel::<String>(1); @@ -106,6 +110,6 @@ .with_max_level(tracing::Level::INFO) .finish(); - #[allow(clippy::expect_used)] + #[expect(clippy::expect_used)] tracing::subscriber::set_global_default(subscriber).expect("setting default subscriber failed"); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/server/root.rs new/git-next-2025.7.1/src/server/root.rs --- old/git-next-2025.5.1/src/server/root.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/server/root.rs 2025-07-06 17:58:10.000000000 +0200 @@ -123,7 +123,7 @@ self.start_xui_actor(ctx, server_updates_bus).await?; } ServerMode::Simple => {} - }; + } // trigger initial config file to load publish!(file_updates_bus, FileUpdated)?; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/tui/actor/handlers/server_update.rs new/git-next-2025.7.1/src/tui/actor/handlers/server_update.rs --- old/git-next-2025.5.1/src/tui/actor/handlers/server_update.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/tui/actor/handlers/server_update.rs 2025-07-06 17:58:10.000000000 +0200 @@ -39,7 +39,7 @@ self.state.tap(); match msg { ServerUpdate::AppConfigLoaded { app_config } => { - self.state.mode = ServerState::from(app_config); + self.state.mode = ServerState::from(*app_config); } ServerUpdate::RepoUpdate { @@ -65,7 +65,7 @@ } } -#[allow(clippy::too_many_lines)] +#[expect(clippy::too_many_lines)] fn handle_repo_update(repo_update: RepoUpdate, repo_state: &mut RepoState) { match repo_update { RepoUpdate::Branches { branches } => { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/tui/components/history.rs new/git-next-2025.7.1/src/tui/components/history.rs --- old/git-next-2025.5.1/src/tui/components/history.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/tui/components/history.rs 2025-07-06 17:58:10.000000000 +0200 @@ -4,9 +4,11 @@ text::{Line, Span, Text}, widgets::{Paragraph, Widget}, }; -use regex::Regex; -use crate::core::git::graph::Log; +use crate::core::{ + git::graph::Log, + regexs::{BRANCHES, RE}, +}; use super::HeightContraintLength; @@ -42,19 +44,7 @@ Self { raw: raw.into() } } } -lazy_static::lazy_static! { - static ref RE: Regex = - #[allow(clippy::unwrap_used)] - Regex::new( - r"^(?<pre>.*)\s(?<hash>[0-9a-f]{7})\s\((?<branches>.*?)\)\s(?<message>.*)", - ).unwrap(); - static ref BRANCHES: Regex = - #[allow(clippy::unwrap_used)] - Regex::new( - r"origin\/(?<branch>[^,]+)", - ).unwrap(); -} impl From<LogLine> for Line<'_> { fn from(value: LogLine) -> Self { match RE.captures(&value.raw) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/tui/logging.rs new/git-next-2025.7.1/src/tui/logging.rs --- old/git-next-2025.5.1/src/tui/logging.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/tui/logging.rs 2025-07-06 17:58:10.000000000 +0200 @@ -2,15 +2,15 @@ use std::path::PathBuf; use directories::ProjectDirs; -use lazy_static::lazy_static; use tracing_error::ErrorLayer; use tracing_subscriber::{self, layer::SubscriberExt, util::SubscriberInitExt, Layer}; use crate::prelude::*; -lazy_static! { - pub static ref PROJECT_NAME: String = env!("CARGO_CRATE_NAME").to_uppercase(); - pub static ref DATA_FOLDER: PathBuf = std::env::var(format!("{}_DATA", PROJECT_NAME.clone())) +pub static PROJECT_NAME: std::sync::LazyLock<String> = + std::sync::LazyLock::new(|| env!("CARGO_CRATE_NAME").to_uppercase()); +pub static DATA_FOLDER: std::sync::LazyLock<PathBuf> = std::sync::LazyLock::new(|| { + std::env::var(format!("{}_DATA", PROJECT_NAME.clone())) .ok() .map(PathBuf::from) .map_or_else( @@ -21,10 +21,12 @@ ) }, |data_folder| data_folder, - ); - pub static ref LOG_ENV: String = format!("{}_LOGLEVEL", PROJECT_NAME.clone()); - pub static ref LOG_FILE: String = format!("{}.log", env!("CARGO_PKG_NAME")); -} + ) +}); +pub static LOG_ENV: std::sync::LazyLock<String> = + std::sync::LazyLock::new(|| format!("{}_LOGLEVEL", PROJECT_NAME.clone())); +pub static LOG_FILE: std::sync::LazyLock<String> = + std::sync::LazyLock::new(|| format!("{}.log", env!("CARGO_PKG_NAME"))); fn project_directory() -> Option<ProjectDirs> { ProjectDirs::from("net", "kemitix", env!("CARGO_PKG_NAME")) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/webhook/mod.rs new/git-next-2025.7.1/src/webhook/mod.rs --- old/git-next-2025.5.1/src/webhook/mod.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/webhook/mod.rs 2025-07-06 17:58:10.000000000 +0200 @@ -18,7 +18,6 @@ pub mod router; mod server; -#[allow(clippy::module_name_repetitions)] #[derive(Debug)] pub struct WebhookActor { socket_addr: SocketAddr, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/xui/server_update_handler.rs new/git-next-2025.7.1/src/xui/server_update_handler.rs --- old/git-next-2025.5.1/src/xui/server_update_handler.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/xui/server_update_handler.rs 2025-07-06 17:58:10.000000000 +0200 @@ -14,7 +14,7 @@ impl Message<ServerUpdate> for Xui { type Reply = std::io::Result<()>; - #[allow(clippy::too_many_lines)] + #[expect(clippy::too_many_lines)] async fn handle( &mut self, msg: ServerUpdate, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/xui/user_input/repo_list_handler.rs new/git-next-2025.7.1/src/xui/user_input/repo_list_handler.rs --- old/git-next-2025.5.1/src/xui/user_input/repo_list_handler.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/xui/user_input/repo_list_handler.rs 2025-07-06 17:58:10.000000000 +0200 @@ -53,7 +53,7 @@ } _ => {} - }; + } Ok(()) } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/xui/widgets/commit_log.rs new/git-next-2025.7.1/src/xui/widgets/commit_log.rs --- old/git-next-2025.5.1/src/xui/widgets/commit_log.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/xui/widgets/commit_log.rs 2025-07-06 17:58:10.000000000 +0200 @@ -3,9 +3,11 @@ text::{Line, Span, Text}, widgets::{Paragraph, Widget}, }; -use regex::Regex; -use crate::core::git::graph::Log; +use crate::core::{ + git::graph::Log, + regexs::{BRANCHES, RE}, +}; use crate::prelude::*; #[derive(Builder, Debug)] @@ -36,19 +38,7 @@ Self { raw: raw.into() } } } -lazy_static::lazy_static! { - static ref RE: Regex = - #[allow(clippy::unwrap_used)] - Regex::new( - r"^(?<pre>.*)\s(?<hash>[0-9a-f]{7})\s\((?<branches>.*?)\)\s(?<message>.*)", - ).unwrap(); - static ref BRANCHES: Regex = - #[allow(clippy::unwrap_used)] - Regex::new( - r"origin\/(?<branch>[^,]+)", - ).unwrap(); -} impl From<LogLine> for Line<'_> { fn from(value: LogLine) -> Self { match RE.captures(&value.raw) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/xui/widgets/data_state.rs new/git-next-2025.7.1/src/xui/widgets/data_state.rs --- old/git-next-2025.5.1/src/xui/widgets/data_state.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/xui/widgets/data_state.rs 2025-07-06 17:58:10.000000000 +0200 @@ -27,7 +27,6 @@ /// ┃ ┃ ┃┃ /// ┃ ┗━━━━━━━━━━━━━━━━━━━━━━┛┃ /// ┗ \[q]uit [/] filter (jo) ━━━━━━━━━━━━━━━━━━━━━━━━┛ - #[allow(clippy::too_many_lines)] fn render( self, area: ratatui::prelude::Rect, @@ -106,7 +105,7 @@ } fn repo_table_width(repo_table_items: &[RepoTableItem]) -> u16 { - #[allow(clippy::cast_possible_truncation)] + #[expect(clippy::cast_possible_truncation)] let forge_repo_width: u16 = repo_table_items .iter() .map(|repo_table_item| repo_table_item.forge_repo().len().clamp(11, 20) as u16) @@ -217,7 +216,7 @@ hints.extend(vec!["[".into(), "n".red(), "]o".into()]); } UiFocus::RebaseCompleted | UiFocus::RebaseError(_) | UiFocus::Progress(_) => {} - }; + } Line::from(hints) } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-next-2025.5.1/src/xui/widgets/repo_table.rs new/git-next-2025.7.1/src/xui/widgets/repo_table.rs --- old/git-next-2025.5.1/src/xui/widgets/repo_table.rs 2025-05-25 15:20:52.000000000 +0200 +++ new/git-next-2025.7.1/src/xui/widgets/repo_table.rs 2025-07-06 17:58:10.000000000 +0200 @@ -48,7 +48,7 @@ .height(1) .style(data.style) }); - #[allow(clippy::cast_possible_truncation)] + #[expect(clippy::cast_possible_truncation)] let max_forge_repo_length: u16 = self .items .iter() ++++++ git-next.obsinfo ++++++ --- /var/tmp/diff_new_pack.BZi3hk/_old 2025-07-07 14:47:21.726436289 +0200 +++ /var/tmp/diff_new_pack.BZi3hk/_new 2025-07-07 14:47:21.726436289 +0200 @@ -1,5 +1,5 @@ name: git-next -version: 2025.5.1 -mtime: 1748179252 -commit: 4791a19f9b5afd0c3359736a2c21de12269b8ee8 +version: 2025.7.1 +mtime: 1751817490 +commit: 6d4323930ced86a26c5bf7950786fbde09c8bb6d ++++++ vendor.tar.zst ++++++ /work/SRC/openSUSE:Factory/git-next/vendor.tar.zst /work/SRC/openSUSE:Factory/.git-next.new.1903/vendor.tar.zst differ: char 8, line 1