Skip to content

Commit

Permalink
Fix stage operate_on_files (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
j178 authored Nov 14, 2024
1 parent 4f1b8c9 commit 2aec6f0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
}
}
Expand Down
2 changes: 2 additions & 0 deletions tests/hook_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ fn hook_impl() -> Result<()> {
- hook id: fail
- exit code: 1
always fail
.pre-commit-config.yaml
"#);

Ok(())
Expand Down

0 comments on commit 2aec6f0

Please sign in to comment.