Reputation: 28770
I am working in a contract with an insanely large repo that has all languages and everything under the sun in the same repo.
So we might have
root
|___ Feature
|
|_ api
|_ Frontend
|___ Feature
Is it possible to have a git hook that is triggered when only there are changes in the Frontend
folder above and does not run when anything else has run?
Upvotes: 0
Views: 31
Reputation: 94423
No, hooks are per project (some web development environments like Gitlab allow global hooks but still not per directory hooks).
Why do you want one? You are not satisfied with the speed? My advice would be to write separate per directory hooks and one real hook in a compiled language (C/C++/Go) that checks what subproject it's operating on and runs a corresponding per directory hook.
Upvotes: 1