git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* receive.denyCurrentBranch=updateInstead won't update the repo
@ 2023-07-17 20:26 Adam "Sinus" Skawiński
  2023-07-17 20:52 ` Junio C Hamano
  2023-07-17 21:09 ` Junio C Hamano
  0 siblings, 2 replies; 9+ messages in thread
From: Adam "Sinus" Skawiński @ 2023-07-17 20:26 UTC (permalink / raw)
  To: git

I'm using Git to push-to-checkout a website.

The receive.denyCurrentBranch=updateInstead option (set on the server
repo), according to the docs, should allow the push and do a checkout
on the worktree if it's clean, or just refuse the push if the worktree
isn't clean. Instead, for me it allows the push, but doesn't update
the worktree - I have to `git checkout -f` on the remote shell after
each push, even though the worktree is clean.

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.

Setup:

My client is 2.31.0.windows.1 (TortoiseGit)
Server’s git is 2.39.1.
My remote is set as ssh://user@hostname.com/path.

Please advise what I can do to investigate further.

-- 
Adam "Sinus" Skawiński

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-07-18 23:30 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-17 20:26 receive.denyCurrentBranch=updateInstead won't update the repo Adam "Sinus" Skawiński
2023-07-17 20:52 ` Junio C Hamano
2023-07-17 21:09 ` Junio C Hamano
     [not found]   ` <CAGE71k2bdy2aYy7speu=OOStopgjzVNOPQ_-V-63aCURLibFWw@mail.gmail.com>
2023-07-17 22:26     ` Adam "Sinus" Skawiński
2023-07-18 22:20       ` Adam "Sinus" Skawiński
2023-07-18 22:28         ` Junio C Hamano
2023-07-18 22:49           ` Adam "Sinus" Skawiński
2023-07-18 23:03             ` Junio C Hamano
2023-07-18 23:29               ` Adam "Sinus" Skawiński

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).