Fossil Forum

Are fossil hooks cloned?
Login

Are fossil hooks cloned?

Are fossil hooks cloned?

(1) By anonymous on 2023-11-04 05:50:23 [link] [source]

I have read the built-in help (fossil help hook and fossil help clone) as well as https://fossil-scm.org/home/doc/trunk/www/hooks.md and could not find the answer (unless I somehow managed to overlook it).

Of course I could try finding it out by trial and error - by creating a repo, a hook, cloning it and looking if the hook was cloned as well, but this defeats the concept of finding answers in the documentation.

(2) By Preben Guldberg (preben) on 2023-11-09 11:30:05 in reply to 1 [source]

On the page you posted a link to, it says "This is a work-in-progress. The interface is in flux.", so I'm unsure if this is considered or decided upon.

FWIW, it looks like hooks are copied when cloning.

However, in my tests, new hooks are not copied, not even with fossil config pull all.

FWIW, I had not expected hooks to be cloned. That would require any commands to work on the cloning host - which to me seem to require a fairly well controlled environment, which I would not expect in the generic case.

(3) By Preben Guldberg (preben) on 2023-11-09 11:59:43 in reply to 2 [link] [source]

Correction: I had done a limited test and saw the hooks cloned with a file based clone.

However, hooks were not copied with an HTTP based clone, nor with an ssh based clone.

That is what I'd hope for, as the hooks need not make sense on a remote host.