The context here is that we have some very large code bases split into thousands of files, the default setup is that real time virus scanning is enforced on all systems. The real time scanning easily balloons out builds to take several minutes in some cases rather than less than a minute when real time scanning is disabled.
I'm trying to work out plausible alternatives that would keep all parties involved happy and maximize productivity while minimizing developer frustation.
Since we use git I thought I could use githooks to execute a script that scans the working directory of the repository (the directory with the .git folder in it)
I've read a bit about post-update and pre-commit hooks, I know pre-commit is typically used for enforcing some coding standard.
I've never used any hooks in git, but I'd like to try configure the git repository to scan files after pulling or out a branch.
Assuming that I have a shell script globally available on every developer machine to scan a directory (or better, individual files) how can I use githooks to reliably trigger that script every time a developer uses git to update a working copy of a file with git, or before they commit a file to git.
What I have tried:
I've tried to understand how the githooks work to the point where I think that postmerge is the closest I'll get, but I'll try it out tomorrow.