logoalt Hacker News

ramon156today at 9:33 AM1 replyview on HN

> you can just run the tests on the local machine, and you should be running them as part of your workflow.

aren't you describing why you'd want a pre-commit for this? you do not have to remember to do so, and new people do not need to learn it.


Replies

Kwpolskatoday at 10:52 AM

There are different workflows. I sometimes commit code that does not compile, so that I have a checkpoint. Or because it’s 16:59 and I want to leave the office (and I want to protect the code I wrote from hardware failure). I’d be annoyed if any pre-commit checks took more than 2-3 minutes, and for most projects, that is not enough to build and run any meaningful tests (especially remotely).

show 1 reply