Thread (1 message) 1 message, 1 author, 2023-07-17

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

From: Junio C Hamano <hidden>
Date: 2023-07-17 20:53:16

"Adam \"Sinus\" Skawiński"  [off-list ref] writes:
Note: The `push-to-checkout` hook doesn't seem to run, either, even
though it's in the .git/hooks/push-to-checkout file, with +x rights as
needed. I made it output some lines and exit with code 1, so it should
abort after producing the output - and yet the pushes come through.
Other hooks, like `update`, work fine and can abort if they exit 1.
I have nothing to offer offhand, but have you compared on the server
side your "update" and "push-to-checkout" hooks?  Even a simple typo
of the filename "push-to-checkout" would make it untable to run ;-).
Similarly to the name of the configuration variable, which is rather
long and prone to be mistyped.  After staring at a problem for a
long time getting frustrated, I myself would miss such a trivial
mistake, and would want to go back and double check just to be sure.

In fact, while trying to reproduce the problem with a simple pair of
repositories, I did manage to mistype denyCurrentBranch and saw that
the machinery not to kick in at all ;-).
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help