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(