Add support for running post-update hooks

E.g. if you want to clear caches or auto-update checked out trees