fix doc comments to please new rust version lints

This commit is contained in:
extrawurst 2024-10-18 18:02:02 +02:00
parent c4f517acb5
commit d7765c4239
2 changed files with 8 additions and 10 deletions

View File

@ -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,
@ -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");
@ -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");
@ -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,

View File

@ -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(