From 45fde7d77f4825d880081b6f99279f517cdb05e9 Mon Sep 17 00:00:00 2001 From: Anas Elgarhy Date: Wed, 21 Feb 2024 21:16:14 +0200 Subject: [PATCH 1/2] fix: fix typos --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- CHANGELOG.md | 2 +- README.md | 4 ++-- asyncgit/src/sync/blame.rs | 2 +- asyncgit/src/sync/config.rs | 2 +- git2-hooks/src/hookspath.rs | 2 +- invalidstring/README.md | 2 +- scopetime/README.md | 2 +- src/components/changes.rs | 2 +- src/components/diff.rs | 2 +- src/components/syntax_text.rs | 2 +- src/main.rs | 2 +- src/popups/msg.rs | 2 +- 13 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index cfc46c12af..b0c66106a6 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,6 +1,6 @@ This Pull Request fixes/closes #{issue_num}. diff --git a/CHANGELOG.md b/CHANGELOG.md index 25a96fa2b6..35fcb9fd5e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,7 +27,7 @@ These defaults require some adoption from existing users but feel more natural t #### key binding bitflags -Modfiers like `SHIFT` or `CONTROL` are no longer configured via magic bitflags but via strings thanks to changes in the [bitflags crate](https://github.com/bitflags/bitflags/blob/main/CHANGELOG.md#changes-to-serde-serialization) we depend on. Please see [KEY_CONFIG.md](./KEY_CONFIG.md) or [vim_style_key_config.ron](./vim_style_key_config.ron) for more info and examples. +Modifiers like `SHIFT` or `CONTROL` are no longer configured via magic bitflags but via strings thanks to changes in the [bitflags crate](https://github.com/bitflags/bitflags/blob/main/CHANGELOG.md#changes-to-serde-serialization) we depend on. Please see [KEY_CONFIG.md](./KEY_CONFIG.md) or [vim_style_key_config.ron](./vim_style_key_config.ron) for more info and examples. ### Added * support for new-line in text-input (e.g. commit message editor) [[@pm100]](https://github/pm100) ([#1662](https://github.com/extrawurst/gitui/issues/1662)). diff --git a/README.md b/README.md index a91f8e8a37..c208a6f778 100644 --- a/README.md +++ b/README.md @@ -223,7 +223,7 @@ All contain a single binary file - perl >= 5.12 (strawberry perl works for windows https://strawberryperl.com/) - a c compiler (msvc, gcc or clang, cargo will find it) -- To run the complete test suite python is required (and it must be invokable as `python`) +- To run the complete test suite python is required (and it must be invocable as `python`) ### Cargo Install @@ -233,7 +233,7 @@ The simplest way to start playing around with `gitui` is to have `cargo` build a #### trace-libgit enable `libgit2` tracing -works if `libgit2` builded with `-DENABLE_TRACE=ON` +works if `libgit2` built with `-DENABLE_TRACE=ON` this feature enabled by default, to disable: `cargo install --no-default-features` diff --git a/asyncgit/src/sync/blame.rs b/asyncgit/src/sync/blame.rs index a068b29284..d3434ed15a 100644 --- a/asyncgit/src/sync/blame.rs +++ b/asyncgit/src/sync/blame.rs @@ -40,7 +40,7 @@ pub struct FileBlame { pub lines: Vec<(Option, String)>, } -/// fixup `\` windows path seperators to git compatible `/` +/// fixup `\` windows path separators to git compatible `/` fn fixup_windows_path(path: &str) -> String { #[cfg(windows)] { diff --git a/asyncgit/src/sync/config.rs b/asyncgit/src/sync/config.rs index dd7043efbc..7898589e16 100644 --- a/asyncgit/src/sync/config.rs +++ b/asyncgit/src/sync/config.rs @@ -88,7 +88,7 @@ pub fn get_config_string_repo( let cfg = repo.config()?; - // this code doesnt match what the doc says regarding what + // this code doesn't match what the doc says regarding what // gets returned when but it actually works let entry_res = cfg.get_entry(key); diff --git a/git2-hooks/src/hookspath.rs b/git2-hooks/src/hookspath.rs index ffd23e703a..714ef81d10 100644 --- a/git2-hooks/src/hookspath.rs +++ b/git2-hooks/src/hookspath.rs @@ -16,7 +16,7 @@ const CONFIG_HOOKS_PATH: &str = "core.hooksPath"; const DEFAULT_HOOKS_PATH: &str = "hooks"; impl HookPaths { - /// `core.hooksPath` always takes precendence. + /// `core.hooksPath` always takes precedence. /// If its defined and there is no hook `hook` this is not considered /// an error or a reason to search in other paths. /// If the config is not set we go into search mode and diff --git a/invalidstring/README.md b/invalidstring/README.md index eea0615cec..4051f4883f 100644 --- a/invalidstring/README.md +++ b/invalidstring/README.md @@ -2,4 +2,4 @@ *just for testing invalid string data* -This crate is part of the [gitui](http://gitui.org) project. We need this to be a seperate crate so that `asyncgit` can remain forbidding `unsafe`. \ No newline at end of file +This crate is part of the [gitui](http://gitui.org) project. We need this to be a separate crate so that `asyncgit` can remain forbidding `unsafe`. \ No newline at end of file diff --git a/scopetime/README.md b/scopetime/README.md index b0ccbd1b10..118a491d35 100644 --- a/scopetime/README.md +++ b/scopetime/README.md @@ -19,7 +19,7 @@ fn foo(){ } ``` -the resulting log looks someting like this: +the resulting log looks something like this: ``` 19:45:00 [TRACE] (7) scopetime: [scopetime/src/lib.rs:34] scopetime: 2 ms [my_crate::foo] @my_crate/src/bar.rs:5 ``` diff --git a/src/components/changes.rs b/src/components/changes.rs index cf24115678..9a8d5859a8 100644 --- a/src/components/changes.rs +++ b/src/components/changes.rs @@ -97,7 +97,7 @@ impl ChangesComponent { let config = self.options.borrow().status_show_untracked(); - //TODO: check if we can handle the one file case with it aswell + //TODO: check if we can handle the one file case with it as well sync::stage_add_all( &self.repo.borrow(), tree_item.info.full_path.as_str(), diff --git a/src/components/diff.rs b/src/components/diff.rs index c402bc69e3..a6ce3ee347 100644 --- a/src/components/diff.rs +++ b/src/components/diff.rs @@ -568,7 +568,7 @@ impl DiffComponent { fn stage_lines(&self) { if let Some(diff) = &self.diff { - //TODO: support untracked files aswell + //TODO: support untracked files as well if !diff.untracked { let selected_lines = self.selected_lines(); diff --git a/src/components/syntax_text.rs b/src/components/syntax_text.rs index 9da5d2cc8e..aaf348ddaf 100644 --- a/src/components/syntax_text.rs +++ b/src/components/syntax_text.rs @@ -107,7 +107,7 @@ impl SyntaxTextComponent { .is_some_and(|(current_file, _)| current_file == &path); if !already_loaded { - //TODO: fetch file content async aswell + //TODO: fetch file content async as well match sync::tree_file_content(&self.repo.borrow(), item) { Ok(content) => { let content = tabs_to_spaces(content); diff --git a/src/main.rs b/src/main.rs index 4531c6acd5..91d6649af6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -370,7 +370,7 @@ fn start_terminal(buf: Stdout) -> io::Result { Ok(terminal) } -// do log::error! and eprintln! in one line, pass sting, error and backtrace +// do log::error! and eprintln! in one line, pass string, error and backtrace macro_rules! log_eprintln { ($string:expr, $e:expr, $bt:expr) => { log::error!($string, $e, $bt); diff --git a/src/popups/msg.rs b/src/popups/msg.rs index d217328df5..cd4488e0e3 100644 --- a/src/popups/msg.rs +++ b/src/popups/msg.rs @@ -43,7 +43,7 @@ impl DrawableComponent for MsgPopup { max = std::u16::MAX as usize; } let mut width = - u16::try_from(max).expect("cant fail due to check above"); + u16::try_from(max).expect("can't fail due to check above"); // dont overflow screen, and dont get too narrow if width > f.size().width { width = f.size().width; From a1b82273af3dcf19bdc9658cf4a4b2dbbdf76a96 Mon Sep 17 00:00:00 2001 From: Anas Elgarhy Date: Wed, 21 Feb 2024 21:28:12 +0200 Subject: [PATCH 2/2] fix: fmt --- src/popups/msg.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/popups/msg.rs b/src/popups/msg.rs index cd4488e0e3..6da957ce88 100644 --- a/src/popups/msg.rs +++ b/src/popups/msg.rs @@ -42,8 +42,8 @@ impl DrawableComponent for MsgPopup { if max > std::u16::MAX as usize { max = std::u16::MAX as usize; } - let mut width = - u16::try_from(max).expect("can't fail due to check above"); + let mut width = u16::try_from(max) + .expect("can't fail due to check above"); // dont overflow screen, and dont get too narrow if width > f.size().width { width = f.size().width;