2 ms·
I've yet to see a convincing reason for githooks. Is it not a violation of abstraction to turn your version control system into a build/test/CI system? Local
by paulddraper 8y ago
I've yet to see a convincing reason for githooks.
Is it not a violation of abstraction to turn your version control system into a build/test/CI system?
Local staging, committing, rebasing, cherry-picking, etc. operate on arbitrary line-delimited text. I should be able to do those without triggering non-VCS things.
Do you want to add a convenient auto format step with your IDE, githooks, or inotifywait? Okay. But changing how a standard, fundamental tool works for everyone...
What's wrong with `make format`?
- qznc 8y agoI'm not sure about this at all. Most checks should be in the CI but git hooks allow a team to add rules without affecting all teams at once. When rules turn out good they can be enforced on everybody via CI. Even a single team might have dozens of machines, so they don't want to roll out git hooks manually. This is the niche use case I can think of. Still, it exploits git to do things it is not made for. This is asking for trouble elsewhere.