Thank you for this great product.
Description
Cache the result of each job in lefthook run and skip re-execution when the input is unchanged.
What problem it is solving?
There are cases where the same checks run twice against the same files:
- Run
lefthook run pre-commit beforehand to pass all checks, then commit → the pre-commit hook fires and runs the same checks again
- Run
lefthook run pre-push at commit time (via a custom hook), then push later → the pre-push hook fires and runs the same checks again
In both cases, if the input (file contents + command definition) hasn't changed, the result would be the same, so the re-execution could be skipped.
I'd be happy to contribute an implementation if this proposal is accepted.
Thank you for this great product.
Description
Cache the result of each job in
lefthook runand skip re-execution when the input is unchanged.What problem it is solving?
There are cases where the same checks run twice against the same files:
lefthook run pre-commitbeforehand to pass all checks, then commit → the pre-commit hook fires and runs the same checks againlefthook run pre-pushat commit time (via a custom hook), then push later → the pre-push hook fires and runs the same checks againIn both cases, if the input (file contents + command definition) hasn't changed, the result would be the same, so the re-execution could be skipped.
I'd be happy to contribute an implementation if this proposal is accepted.