On Mon, Jan 9, 2012 at 22:58, Vincent Demeester <vinc...@demeester.fr> wrote:
> - Is the hook(s) sourced or executed ?
I am leaning towards execution, but I am undecided either way.
> - Is it possible to stack hooks automatically
I think it should be.
> (or by writing something in the
> hook) ?
That's trivial, but meh.
> And the next question would be where to the `run_hook` ?
> At first sight, I thought at start and end of each function: pre-init and
> init for the init method, etc.
> But, what about the clone function for example : by using a naive approach the
> hook « graph call » would be : pre-clone, pre-init, post-init, post-clone.
> work for my use case (as I just need to write a post-init hook) but what if
> need is to run a hook after the `git fetch` in clone and before the `git
We will just need to come up with a list of possible places. Littering
does not make sense, but we can always add hooks later.
> Finally, about the ability to enable/disable hook like the system that couples
> vcsh and mr, that could be very good, but I'm not sure to see how the
> would be ; something like $VCSH_HOOK_D/available.d/… and
> $VCSH_HOOK_D/config.d/… ?
Something like that, yes.
vcsh would then get the ability to list, enable and disable hooks. Think
vcsh enable-hook zsh/pre-commit
vcs-home mailing list