Closed gabyx closed 3 years ago
Can you give some more details on why is this needed? We already have STAGED_FILES set of I remember correctly, so we could just use that in the existing hooks, instead of the whole assert thing from a separate script. Do you need that because you don't have the hooks locally when on the Go branch?
No, sometimes, you want to execute a pre-commit hook single without invoking git. This ensures that it works...
Also I added a fix, such that git commit --fixup
works
No, sometimes, you want to execute a pre-commit hook single without invoking git. This ensures that it works...
OK, that makes sense. I'd have perhaps done it with a special wrapper to do the extra work of setting the staged files variable for you, but this works too I guess, just a bit more boilerplate duplicated.
$ sh bin/run-manually.sh .githooks/pre-commit/no-todo
A cherry-pick from currenty go-refactoring.
Makes these hooks way faster. I more and more god fed up that it takes too long ;-) Tested them, works. Thx for merging.