Re: receive.denyCurrentBranch=updateInstead won't update the repo

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

 



"Adam \"Sinus\" Skawiński"  <adam.skawinski@xxxxxxxxx> writes:

> Correct me if I'm wrong, but I'm looking at receive-pack.c and can't
> grasp one thing.
>
> In receive-pack.c:1452-1453,
>> if (!invoked_hook)
>>   retval = push_to_deploy(sha1, &env, worktree->path);
> ... push_to_deploy is reached only if... hook didn't get invoked?

Correct.  The hook is responsible for both DECIDING if it wants to
touch/update the working tree, AND ACTUALLY UPDATING the working
tree itself.

And the entire point of the "hook" is that its update does not have
to be just "checkout the given commit's tree", for which using the
default push-to-deply is sufficient.  It is for those who want to do
more.




[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