diff options
| author | Alyssa Ross <hi@alyssa.is> | 2026-05-25 18:23:12 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-05-26 07:54:18 +0900 |
| commit | 44d04e442683b53ed618b74861f056f93fcbd783 (patch) | |
| tree | dbbf9588470b68270ff4e3b7aa46ecc3f0f6a204 /t/t4013/diff.diff_initial..side | |
| parent | 67ad42147a7acc2af6074753ebd03d904476118f (diff) | |
receive-pack: fix updateInstead with core.worktree
Before a8cc594333 (hooks: fix an obscure TOCTOU "did we just run a
hook?" race, 2022-03-07), when receive.denyCurrentBranch is set to
updateInstead, only one of push_to_checkout() or push_to_deploy()
was called. That commit changed to always call push_to_checkout(),
and then to call push_to_deploy() if push_to_checkout() didn't run
anything.
This change didn't take into account that push_to_checkout() had a
side effect of modifying env, and that modified env broke updating
the worktree in push_to_deploy() if core.worktree was configured.
To fix this, only mutate the environment used inside
push_to_commit(), rather than the environment that might later be
passed to push_to_deploy().
Signed-off-by: Alyssa Ross <hi@alyssa.is>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4013/diff.diff_initial..side')
0 files changed, 0 insertions, 0 deletions
