diff --git a/src/config.rs b/src/config.rs index 97973ba..4275680 100644 --- a/src/config.rs +++ b/src/config.rs @@ -191,11 +191,12 @@ impl Stage { pub fn operate_on_files(self) -> bool { matches!( self, - Stage::PostCheckout - | Stage::PostCommit - | Stage::PostMerge - | Stage::PostRewrite - | Stage::PreRebase + Stage::Manual + | Stage::CommitMsg + | Stage::PreCommit + | Stage::PreMergeCommit + | Stage::PrePush + | Stage::PrepareCommitMsg ) } } diff --git a/tests/hook_impl.rs b/tests/hook_impl.rs index 462441f..6dbd43b 100644 --- a/tests/hook_impl.rs +++ b/tests/hook_impl.rs @@ -63,6 +63,8 @@ fn hook_impl() -> Result<()> { - hook id: fail - exit code: 1 always fail + + .pre-commit-config.yaml "#); Ok(())