zlacker

[return to "Prek: A better, faster, drop-in pre-commit replacement, engineered in Rust"]
1. dpc_01+fy[view] [source] 2026-02-03 18:42:18
>>fortui+(OP)
BTW. Pre-commit hooks are the wrong way to go about this stuff.

I'm advocating for JJ to build a proper daemon that runs "checks" per change in the background. So you don't run pre-commit checks when committing. They just happen in the background, and when by the time you get to sharing your changes, you get all the things verified for you for each change/commit, effortlessly without you wasting time or needing to do anything special.

I have something a bit like that implemented in SelfCI (a minimalistic local-first Unix-philosophy-abiding CI) https://app.radicle.xyz/nodes/radicle.dpc.pw/rad%3Az2tDzYbAX... and it replaced my use of pre-commit hooks entirely. And users already told me that it does feel like commit hooks done right.

◧◩
2. jiehon+pU[view] [source] 2026-02-03 20:15:33
>>dpc_01+fy
Yep, I think a watcher is better suited [0] to trigger on file changes.

I personally can't stand my git commit command to be slow or to fail.

[0]: such as https://github.com/watchexec/watchexec

◧◩◪
3. jiehon+QX[view] [source] 2026-02-03 20:30:33
>>jiehon+pU
To myself: sometimes I think the background process should be committing for me automatically each time a new working set exists, and I should only rebase and squash before pushing.

That’s reversing the flow of control, but might be workable!

◧◩◪◨
4. wrs+X11[view] [source] 2026-02-03 20:51:43
>>jiehon+QX
jj already pretty much does that with the oplog. A consistent way of making new snapshots in the background would be nice though. (Currently you have to run a jj command — any jj command — to capture the working directory.)
◧◩◪◨⬒
5. stavro+fc1[view] [source] 2026-02-03 21:43:59
>>wrs+X11
I don't think you have to, you can run the integrated watcher, no?
[go to top]