From d7765c4239bebb0f3d8d2df741a2edc701f73318 Mon Sep 17 00:00:00 2001 From: extrawurst Date: Fri, 18 Oct 2024 18:02:02 +0200 Subject: [PATCH 1/4] fix doc comments to please new rust version lints --- asyncgit/src/sync/hooks.rs | 12 ++++-------- git2-hooks/src/lib.rs | 6 ++++-- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/asyncgit/src/sync/hooks.rs b/asyncgit/src/sync/hooks.rs index b692891853..3e82cf6f8d 100644 --- a/asyncgit/src/sync/hooks.rs +++ b/asyncgit/src/sync/hooks.rs @@ -26,10 +26,7 @@ impl From for HookResult { } } -/// this hook is documented here -/// we use the same convention as other git clients to create a temp file containing -/// the commit message at `<.git|hooksPath>/COMMIT_EDITMSG` and pass it's relative path as the only -/// parameter to the hook script. +/// see `git2_hooks::hooks_commit_msg` pub fn hooks_commit_msg( repo_path: &RepoPath, msg: &mut String, @@ -41,8 +38,7 @@ pub fn hooks_commit_msg( Ok(git2_hooks::hooks_commit_msg(&repo, None, msg)?.into()) } -/// this hook is documented here -/// +/// see `git2_hooks::hooks_pre_commit` pub fn hooks_pre_commit(repo_path: &RepoPath) -> Result { scope_time!("hooks_pre_commit"); @@ -51,7 +47,7 @@ pub fn hooks_pre_commit(repo_path: &RepoPath) -> Result { Ok(git2_hooks::hooks_pre_commit(&repo, None)?.into()) } -/// +/// see `git2_hooks::hooks_post_commit` pub fn hooks_post_commit(repo_path: &RepoPath) -> Result { scope_time!("hooks_post_commit"); @@ -60,7 +56,7 @@ pub fn hooks_post_commit(repo_path: &RepoPath) -> Result { Ok(git2_hooks::hooks_post_commit(&repo, None)?.into()) } -/// +/// see `git2_hooks::hooks_prepare_commit_msg` pub fn hooks_prepare_commit_msg( repo_path: &RepoPath, source: PrepareCommitMsgSource, diff --git a/git2-hooks/src/lib.rs b/git2-hooks/src/lib.rs index 43e5e18f2c..2a458856d7 100644 --- a/git2-hooks/src/lib.rs +++ b/git2-hooks/src/lib.rs @@ -112,8 +112,10 @@ fn create_hook_in_path(path: &Path, hook_script: &[u8]) { } } -/// this hook is documented here -/// we use the same convention as other git clients to create a temp file containing +/// Git hook: `commit_msg` +/// +/// This hook is documented here . +/// We use the same convention as other git clients to create a temp file containing /// the commit message at `<.git|hooksPath>/COMMIT_EDITMSG` and pass it's relative path as the only /// parameter to the hook script. pub fn hooks_commit_msg( From ba9adf40f4d6af6792a699d0e6f1d92367f30d0e Mon Sep 17 00:00:00 2001 From: extrawurst Date: Fri, 18 Oct 2024 18:02:51 +0200 Subject: [PATCH 2/4] fix yanked crate --- Cargo.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1dfe743ea5..eb159d3bd4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -919,9 +919,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -929,9 +929,9 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" @@ -946,27 +946,27 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", From fb1ba7c0b952a351b30e1ea9b50d7e2298d53c72 Mon Sep 17 00:00:00 2001 From: wugeer <1284057728@qq.com> Date: Sat, 19 Oct 2024 00:07:35 +0800 Subject: [PATCH 3/4] feat: help popup display viewing progress (#2388) --- CHANGELOG.md | 1 + src/popups/help.rs | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e89e1af6cb..0de765f2be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,6 +38,7 @@ 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) * 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/extrawurst/gitui/pull/2187)) +* support help popup display viewing progress[[@wugeer](https://github.com/wugeer)](https://github.com/extrawurst/gitui/pull/2388)) ### Fixes * update yanked dependency to `libc` to fix building with `--locked`. diff --git a/src/popups/help.rs b/src/popups/help.rs index ebf687ad5e..9e9b702e71 100644 --- a/src/popups/help.rs +++ b/src/popups/help.rs @@ -67,6 +67,15 @@ impl DrawableComponent for HelpPopup { chunks[0], ); + ui::draw_scrollbar( + f, + area, + &self.theme, + self.cmds.len(), + self.selection as usize, + ui::Orientation::Vertical, + ); + f.render_widget( Paragraph::new(Line::from(vec![Span::styled( Cow::from(format!( From e7be093c391f9c07ec5d033e8785286f6172adf0 Mon Sep 17 00:00:00 2001 From: extrawurst Date: Fri, 18 Oct 2024 18:08:36 +0200 Subject: [PATCH 4/4] fix changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0de765f2be..59b1710c60 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Set `CREATE_NO_WINDOW` flag when executing Git hooks on Windows ([#2371](https://github.com/extrawurst/gitui/pull/2371)) ### Added +* help popup scrollbar [[@wugeer](https://github.com/wugeer)](https://github.com/extrawurst/gitui/pull/2388)) * add popups for viewing, adding, updating and removing remotes [[@robin-thoene](https://github.com/robin-thoene)] ([#2172](https://github.com/extrawurst/gitui/issues/2172)) ## [0.26.3] - 2024-06-02 @@ -38,7 +39,6 @@ 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) * 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/extrawurst/gitui/pull/2187)) -* support help popup display viewing progress[[@wugeer](https://github.com/wugeer)](https://github.com/extrawurst/gitui/pull/2388)) ### Fixes * update yanked dependency to `libc` to fix building with `--locked`.