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? I have now re-tested and, indeed, once I got _rid_ of the hook entirely, deployment proceeded! So, shouldn't that be a check for retval instead, perhaps..? On Tue, 18 Jul 2023 at 00:26, Adam "Sinus" Skawiński <adam.skawinski@xxxxxxxxx> wrote: > > (I seem to have responded privately to the helpful Junio C Hamano, > instead of to the list, sorry about that.) > > Well, there's progress. Indeed I must have borked something with the > hook, as I can now confirm that the hook works and fails as intended. > > Still, local-to-server pushes fail to checkout on the server, without > any indication as to why. The server clearly recognizes the > updateInstead option, as it runs the push-to-checkout hook, but then > it silently fails to update the remote worktree. > > Any idea what could be causing this? > > Pushing to ssh://*hostname*/home/uuuusername/domains/mywebsite.com > Enumerating objects: 5, done. > Counting objects: 100% (5/5), done. > Delta compression using up to 8 threads > Compressing objects: 100% (3/3), done. > Writing objects: 100% (3/3), 284 bytes | 284.00 KiB/s, done. > Total 3 (delta 2), reused 0 (delta 0), pack-reused 0 > remote: HOOK UPDATE: 1=refs/heads/mywebsite > 2=650585f1c2abdbbd68de71acfb31b5d66ee1d0f3 > 3=adc4a555cfc23e037ad026a405a13e7a468188c4 GITDIR= > HOOK PUSH-TO-CHECKOUT 1=adc4a555cfc23e037ad026a405a13e7a468188c4 2= 3= GITDIR= > To ssh://*hostname*/home/uuuusername/domains/mywebsite.com > 650585f..adc4a55 mywebsite -> mywebsite > updating local tracking ref 'refs/remotes/myserver-mywebsite/mywebsite' > > -- > Adam "Sinus" Skawiński -- Adam "Sinus" Skawiński