| 1 Aug 2025 |
emily | yes if
- you are okay having no formatting while you work on commits, which can be very annoying
- you use tooling that works with pre-commit hooks
- pre-commit hooks do not make you fly into a rage
| 16:07:08 |
raitobezarius | I feel like there's three schools of thoughts:
- no formatting enforced
- partial formatting
- full formatting
| 16:07:11 |
emily | I'm good with (1) but not (2) or (3) | 16:07:14 |
raitobezarius | In reply to @emilazy:matrix.org I'm good with (1) but not (2) or (3) Can you explain why (3) applies | 16:07:58 |
emily | for (2), in-memory tools like git revise don't work with pre-commit hooks, and they go against the jj model so they don't work there at all… (pre-push hooks would work here but are even worse in terms of ~shift left~, editor formatting + pre-push is fine but just pre-push is annoying because you get conflicts between commits) | 16:08:09 |
emily | (and e.g. jj fix works in-memory with arbitrary formatting tools, can fix formatting for an entire stack, and can resolve conflicts caused by reformatting, but it will not work with the Git thing that splices out specific parts of the changed diff) | 16:08:42 |
Charles | pre commit hooks have always kind of felt like the wrong tool for any job to me | 16:09:00 |