Re: post-checkout hook not run on clone

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff King <peff@xxxxxxxx> wrote:

>> On Mon, Mar 02, 2009 at 02:43:37PM -0800, layer wrote:
>> 
>> > I realize this might be a feature, but when I switch to the master
>> > branch with "git checkout master" it is, and I would think that a
>> > clone that gets the master branch would also does a sort of "checkout
>> > master" and would run the hook.
>> 
>> Right. Hooks are not cloned with the repo.

The hook in question was in /usr/share/git-core/templates/hooks/, so
it would get setup on clone.  That works fine.  If I immediately
switch branches, the hook gets called.  It's just the `post-clone'
(when I assume something like `checkout' is done), the hook doesn't
get called.

>> The general wisdom on the list is that it's a bad idea to run remote
>> code arbitrarily for security reasons...

I agree, but not in this specific situation.  All the users of the
code are trusted, as is the author of the hooks.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux