Skip to content

Commit d7765c4

Browse files
committed
fix doc comments to please new rust version lints
1 parent c4f517a commit d7765c4

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

asyncgit/src/sync/hooks.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,7 @@ impl From<git2_hooks::HookResult> for HookResult {
2626
}
2727
}
2828

29-
/// this hook is documented here <https://git-scm.com/docs/githooks#_commit_msg>
30-
/// we use the same convention as other git clients to create a temp file containing
31-
/// the commit message at `<.git|hooksPath>/COMMIT_EDITMSG` and pass it's relative path as the only
32-
/// parameter to the hook script.
29+
/// see `git2_hooks::hooks_commit_msg`
3330
pub fn hooks_commit_msg(
3431
repo_path: &RepoPath,
3532
msg: &mut String,
@@ -41,8 +38,7 @@ pub fn hooks_commit_msg(
4138
Ok(git2_hooks::hooks_commit_msg(&repo, None, msg)?.into())
4239
}
4340

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

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

54-
///
50+
/// see `git2_hooks::hooks_post_commit`
5551
pub fn hooks_post_commit(repo_path: &RepoPath) -> Result<HookResult> {
5652
scope_time!("hooks_post_commit");
5753

@@ -60,7 +56,7 @@ pub fn hooks_post_commit(repo_path: &RepoPath) -> Result<HookResult> {
6056
Ok(git2_hooks::hooks_post_commit(&repo, None)?.into())
6157
}
6258

63-
///
59+
/// see `git2_hooks::hooks_prepare_commit_msg`
6460
pub fn hooks_prepare_commit_msg(
6561
repo_path: &RepoPath,
6662
source: PrepareCommitMsgSource,

git2-hooks/src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,10 @@ fn create_hook_in_path(path: &Path, hook_script: &[u8]) {
112112
}
113113
}
114114

115-
/// this hook is documented here <https://git-scm.com/docs/githooks#_commit_msg>
116-
/// we use the same convention as other git clients to create a temp file containing
115+
/// Git hook: `commit_msg`
116+
///
117+
/// This hook is documented here <https://git-scm.com/docs/githooks#_commit_msg>.
118+
/// We use the same convention as other git clients to create a temp file containing
117119
/// the commit message at `<.git|hooksPath>/COMMIT_EDITMSG` and pass it's relative path as the only
118120
/// parameter to the hook script.
119121
pub fn hooks_commit_msg(

0 commit comments

Comments
 (0)