Skip to content

Commit

Permalink
Merge branch 'master' into struct-patch-upgrade-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
extrawurst authored Oct 18, 2024
2 parents 1a46e5e + e7be093 commit a4efc6a
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 22 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 12 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 4 additions & 8 deletions asyncgit/src/sync/hooks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ impl From<git2_hooks::HookResult> for HookResult {
}
}

/// this hook is documented here <https://git-scm.com/docs/githooks#_commit_msg>
/// 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,
Expand All @@ -41,8 +38,7 @@ pub fn hooks_commit_msg(
Ok(git2_hooks::hooks_commit_msg(&repo, None, msg)?.into())
}

/// this hook is documented here <https://git-scm.com/docs/githooks#_pre_commit>
///
/// see `git2_hooks::hooks_pre_commit`
pub fn hooks_pre_commit(repo_path: &RepoPath) -> Result<HookResult> {
scope_time!("hooks_pre_commit");

Expand All @@ -51,7 +47,7 @@ pub fn hooks_pre_commit(repo_path: &RepoPath) -> Result<HookResult> {
Ok(git2_hooks::hooks_pre_commit(&repo, None)?.into())
}

///
/// see `git2_hooks::hooks_post_commit`
pub fn hooks_post_commit(repo_path: &RepoPath) -> Result<HookResult> {
scope_time!("hooks_post_commit");

Expand All @@ -60,7 +56,7 @@ pub fn hooks_post_commit(repo_path: &RepoPath) -> Result<HookResult> {
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,
Expand Down
6 changes: 4 additions & 2 deletions git2-hooks/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,10 @@ fn create_hook_in_path(path: &Path, hook_script: &[u8]) {
}
}

/// this hook is documented here <https://git-scm.com/docs/githooks#_commit_msg>
/// we use the same convention as other git clients to create a temp file containing
/// Git hook: `commit_msg`
///
/// This hook is documented here <https://git-scm.com/docs/githooks#_commit_msg>.
/// 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(
Expand Down
9 changes: 9 additions & 0 deletions src/popups/help.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!(
Expand Down

0 comments on commit a4efc6a

Please sign in to comment.