Skip to content

Commit

Permalink
fix doc comments to please new rust version lints
Browse files Browse the repository at this point in the history
  • Loading branch information
extrawurst committed Oct 18, 2024
1 parent c4f517a commit d7765c4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
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

0 comments on commit d7765c4

Please sign in to comment.