Is it possible to run pip-compile compile hook only if the requirements.in file changes ? The problem is pip-compile is consuming more time and delaying the git push.
Describe the solution you'd like
Compare the current file with the file in the git remote branch. Activate pip-compile only of there is a change.
This should generally be possible. By default, pre-commit run only runs the hooks on staged files.
What does your .pre-commit-config.yaml look like for the hook?
What's the problem this feature will solve?
Is it possible to run pip-compile compile hook only if the requirements.in file changes ? The problem is pip-compile is consuming more time and delaying the git push.
Describe the solution you'd like
Compare the current file with the file in the git remote branch. Activate pip-compile only of there is a change.