RichiH / vcsh

config manager based on Git

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

post-clone hooks not called for a repo

DancingQuanta opened this issue · comments

Do a repo-specific post-clone hook get executed upon a clone?

For example, say the repo is called example and the post-clone hook is called

hooks-enabled/example.post-clone.00-sparseCheckOut

This hook did not get called when example is cloned if the hook script is within the example repo.

Are you sure the hook script is executable ? I am using a post clone hook that exists in the repo I clone.

If it is working for you then, I am doing something seriously wrong with my setup. I will do a fresh check soon.

Yea, as far as I can tell judging by the source code, every hook after post-merge should work fine as files would be pulled in (including post-merge).

I've looked at this a bit and am unable to replicate it. As far as I can tell it is working properly.

I'd be happy to help debug this a bit further if you are still around and can still replicate this. Can you run the clone with debug mode enabled as in vcsh -d clone ... so we can see what's going on? (using the current Git HEAD if possible, or the latest release you have packages for if not).

on even further review I bet I can guess what the issue is from this...

This hook did not get called when example is cloned if the hook script is within the example repo.

I don't think you put the hooks in the right place. The hooks aren't part of the repo itself. Your hook scripts should be part of your VCSH configuration and in place before you clone any repositories that need to run this hook.

Git (knowingly) doesn't provide a post-clone hook for individual repositories that could be passed around as part of the repository largely because of the security implications (although implementation would also be troublesome even if you ignored the security).

If I missed something here or you have further questions please feel free to comment or ask again.