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. BeeOnR+Ce[view] [source] 2026-02-03 17:30:00
>>candid+6a
They integrate well with CI.

You run the same hooks in CI as locally so it's DRY and pushes people to use the hooks locally to get the early feedback instead of failing in CI.

Hooks without CI are less useful since they will be constantly broken.

◧◩◪
3. candid+0f[view] [source] 2026-02-03 17:31:34
>>BeeOnR+Ce
Why wouldn't I just call the same shell script in CI and locally though? What's the benefit here? All I'm seeing is circular logic.
◧◩◪◨
4. BeeOnR+6r1[view] [source] 2026-02-03 23:03:02
>>candid+0f
If you had a shell script hook, yes you would also run that in CI.

Are you asking what advantage pre-commit has over a shell script?

Mostly just functionality: running multiple hooks, running them in parallel, deciding which hooks to run based on the commit files, "decoding" the commit to a list of files, offering a bunch canned hooks, offering the ability to write and install non-shell hooks in a standard way.

[go to top]