3 ms·
I think there's value in git hooks, but pre-commit is the wrong hook. This belongs in a hook that runs on attempted push, not on commit.
by JoshTriplett 9mo ago
I think there's value in git hooks, but pre-commit is the wrong hook. This belongs in a hook that runs on attempted push, not on commit.
- esafak 9mo agoRun the light ones on commit, the heavy ones on push.
- fortuitous-frog 9mo agoThere's a config option for that :) https://prek.j178.dev/configuration/#default_install_hook_types https://prek.j178.dev/configuration/#default_install_hook_ty...
- anttihaapala 9mo agoformatting should definitely be in pre-commit though, otherwise you'll destroy diffs.
- Marsymars 9mo ago"pre-commit the tool" supports the pre-push hook (as well as the various other hooks).