From 3455059efe4bdde1f19d2154dde0d532aa59084b Mon Sep 17 00:00:00 2001 From: Link Mauve Date: Fri, 17 Oct 2025 14:48:54 +0200 Subject: [PATCH] Fix typos Thanks to typos for finding those! --- CHANGELOG.md | 4 ++-- asyncgit/src/sync/branch/mod.rs | 8 ++++---- asyncgit/src/sync/remotes/push.rs | 2 +- git2-hooks/src/lib.rs | 6 +++--- src/clipboard.rs | 2 +- src/input.rs | 8 ++++---- src/notify_mutex.rs | 4 ++-- src/popups/taglist.rs | 4 ++-- 8 files changed, 19 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e27a1c447f..414b896060 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -70,7 +70,7 @@ but this also allows us now to define colors in the common hex format: Checkout [THEMES.md](./THEMES.md) for more info. ### Added -* due to github runner changes, the regular mac build is now arm64, so we added support for intel x86 apple build in nightlies and releases (via separat artifact) +* due to github runner changes, the regular mac build is now arm64, so we added support for intel x86 apple build in nightlies and releases (via separate artifact) * support `BUILD_GIT_COMMIT_ID` enabling builds from `git archive` generated source tarballs or other outside a git repo [[@alerque](https://github.com/alerque)] ([#2187](https://github.com/gitui-org/gitui/pull/2187)) ### Fixes @@ -907,7 +907,7 @@ Thanks for your interest and support over this year! Read more about the 1 year - log tab refreshes when head changes ([#78](https://github.com/gitui-org/gitui/issues/78)) - performance optimization of the log tab in big repos - more readable default color for the commit hash in the log tab -- more error/panic resiliance (`unwrap`/`panic` denied by clippy now) [[@MCord](https://github.com/MCord)](<[#77](https://github.com/gitui-org/gitui/issues/77)>) +- more error/panic resilience (`unwrap`/`panic` denied by clippy now) [[@MCord](https://github.com/MCord)](<[#77](https://github.com/gitui-org/gitui/issues/77)>) ### Fixes diff --git a/asyncgit/src/sync/branch/mod.rs b/asyncgit/src/sync/branch/mod.rs index 81ec2ec586..9b613897fa 100644 --- a/asyncgit/src/sync/branch/mod.rs +++ b/asyncgit/src/sync/branch/mod.rs @@ -715,13 +715,13 @@ mod tests_branches { &root.as_os_str().to_str().unwrap().into(); let branch_name = "master"; - let upstrem_merge = "refs/heads/master"; + let upstream_merge = "refs/heads/master"; let mut config = repo.config().unwrap(); config .set_str( &format!("branch.{branch_name}.merge"), - upstrem_merge, + upstream_merge, ) .expect("fail set branch merge config"); @@ -732,7 +732,7 @@ mod tests_branches { .is_ok_and(|v| v.as_ref().is_some())); assert_eq!( &upstream_merge_res.unwrap().unwrap(), - upstrem_merge + upstream_merge ); } } @@ -1017,7 +1017,7 @@ mod test_remote_branches { } #[test] - fn test_checkout_remote_branch_hirachical() { + fn test_checkout_remote_branch_hierarchical() { let (r1_dir, _repo) = repo_init_bare().unwrap(); let (clone1_dir, clone1) = diff --git a/asyncgit/src/sync/remotes/push.rs b/asyncgit/src/sync/remotes/push.rs index a4146a8461..69e954e1e0 100644 --- a/asyncgit/src/sync/remotes/push.rs +++ b/asyncgit/src/sync/remotes/push.rs @@ -129,7 +129,7 @@ pub fn push_branch( ) } -//TODO: clenaup +//TODO: cleanup #[allow(clippy::too_many_arguments)] pub fn push_raw( repo_path: &RepoPath, diff --git a/git2-hooks/src/lib.rs b/git2-hooks/src/lib.rs index 4c949a1e46..688ddc5294 100644 --- a/git2-hooks/src/lib.rs +++ b/git2-hooks/src/lib.rs @@ -372,7 +372,7 @@ exit 0 } #[test] - fn test_other_path_precendence() { + fn test_other_path_precedence() { let (td, repo) = repo_init(); { @@ -493,7 +493,7 @@ exit 1 fn test_pre_commit_py() { let (_td, repo) = repo_init(); - // mirror how python pre-commmit sets itself up + // mirror how python pre-commit sets itself up #[cfg(not(windows))] let hook = b"#!/usr/bin/env python import sys @@ -514,7 +514,7 @@ sys.exit(0) fn test_pre_commit_fail_py() { let (_td, repo) = repo_init(); - // mirror how python pre-commmit sets itself up + // mirror how python pre-commit sets itself up #[cfg(not(windows))] let hook = b"#!/usr/bin/env python import sys diff --git a/src/clipboard.rs b/src/clipboard.rs index 3bd8b2d6fc..253fdb5953 100644 --- a/src/clipboard.rs +++ b/src/clipboard.rs @@ -50,7 +50,7 @@ fn exec_copy_with_args( } // Implementation taken from https://crates.io/crates/wsl. -// Using /proc/sys/kernel/osrelease as an authoratative source +// Using /proc/sys/kernel/osrelease as an authoritative source // based on this comment: https://github.com/microsoft/WSL/issues/423#issuecomment-221627364 #[cfg(all(target_family = "unix", not(target_os = "macos")))] fn is_wsl() -> bool { diff --git a/src/input.rs b/src/input.rs index 3ef7c0414b..efe025c61a 100644 --- a/src/input.rs +++ b/src/input.rs @@ -1,4 +1,4 @@ -use crate::notify_mutex::NotifyableMutex; +use crate::notify_mutex::NotifiableMutex; use anyhow::Result; use crossbeam_channel::{unbounded, Receiver, Sender}; use crossterm::event::{self, Event, Event::Key, KeyEventKind}; @@ -31,7 +31,7 @@ pub enum InputEvent { /// #[derive(Clone)] pub struct Input { - desired_state: Arc>, + desired_state: Arc>, current_state: Arc, receiver: Receiver, aborted: Arc, @@ -42,7 +42,7 @@ impl Input { pub fn new() -> Self { let (tx, rx) = unbounded(); - let desired_state = Arc::new(NotifyableMutex::new(true)); + let desired_state = Arc::new(NotifiableMutex::new(true)); let current_state = Arc::new(AtomicBool::new(true)); let aborted = Arc::new(AtomicBool::new(false)); @@ -100,7 +100,7 @@ impl Input { } fn input_loop( - arc_desired: &Arc>, + arc_desired: &Arc>, arc_current: &Arc, tx: &Sender, ) -> Result<()> { diff --git a/src/notify_mutex.rs b/src/notify_mutex.rs index d70a5007a3..b91f2fa4f5 100644 --- a/src/notify_mutex.rs +++ b/src/notify_mutex.rs @@ -2,14 +2,14 @@ use std::sync::{Arc, Condvar, Mutex}; /// combines a `Mutex` and `Condvar` to allow waiting for a change in the variable protected by the `Mutex` #[derive(Clone, Debug)] -pub struct NotifyableMutex +pub struct NotifiableMutex where T: Send + Sync, { data: Arc<(Mutex, Condvar)>, } -impl NotifyableMutex +impl NotifiableMutex where T: Send + Sync, { diff --git a/src/popups/taglist.rs b/src/popups/taglist.rs index 8acda78e89..926771c28c 100644 --- a/src/popups/taglist.rs +++ b/src/popups/taglist.rs @@ -460,7 +460,7 @@ impl TagListPopup { EMPTY_SYMBOL }; - let has_attachement_str = if tag.annotation.is_some() { + let has_attachment_str = if tag.annotation.is_some() { ATTACHMENT_SYMBOL } else { EMPTY_SYMBOL @@ -475,7 +475,7 @@ impl TagListPopup { .style(self.theme.commit_time(false)), Cell::from(tag.author.clone()) .style(self.theme.commit_author(false)), - Cell::from(has_attachement_str) + Cell::from(has_attachment_str) .style(self.theme.text_danger()), Cell::from(tag.message.clone()) .style(self.theme.text(true, false)),