zlacker

[return to "Prek: A better, faster, drop-in pre-commit replacement, engineered in Rust"]
1. candid+6a[view] [source] 2026-02-03 17:10:22
>>fortui+(OP)
I struggle to see value with git hooks. They're an opt-in, easily opt-out way of calling shell scripts from my understanding--you can't force folks to run them, and they don't integrate/display nicely with CI/CD.

Why not just call a shell script directly? How would you use these with a CI/CD platform?

◧◩
2. pxc+L83[view] [source] 2026-02-04 12:48:18
>>candid+6a
I think of Git hooks as a useful guiderail for myself that I share with others. They sometimes help me reduce the length of iteration cycles for workflows (which I generally don't like) where one typically commits before running/deploying (e.g., most of my team's Terraform repos).

> you can't force folks to run them

I think it's useful to be able to disable things like this when debugging or reconfiguring them. I sometimes disable the ones I've set up for myself, then reenable them later.

> Why not just call a shell script directly?

Because it's manual; I have to remember to do it each time. But there's no reason not to have a script you can invoke in other ways, if that's something you want.

> How would you use these with a CI/CD platform?

The thing that sets up your environment also installs the git hooks configuration, and/or you can have it invoke specific hooks via CLI.

[go to top]