mbox series

[0/2] transport: don't ignore git-receive-pack(1) exit code on atomic push

Message ID 20241113-pks-push-atomic-respect-exit-code-v1-0-7965f01e7f4e@pks.im (mailing list archive)
Headers show
Series transport: don't ignore git-receive-pack(1) exit code on atomic push | expand

Message

Patrick Steinhardt Nov. 13, 2024, 11:24 a.m. UTC
Hi,

we've hit an edge case at GitLab where an atomic push will not notice an
error when git-receive-pack(1) updates the refs, but otherwise fails
with a non-zero exit code. The push would be successful and no error
would be printed even though some things have gone wrong on the remote
side.

This patch serise fixes the issue. I'm not a 100% sure whether this fix
is correct or not because it has interactions with the "--porcelain"
mode, which is quite underspecified overall. So I'd appreciate some
extra scrutiny on this series.

Thanks!

Patrick

To: git@vger.kernel.org
Cc: Jiang Xin <zhiyou.jx@alibaba-inc.com>

Patrick Steinhardt (2):
      t5504: modernize test by moving heredocs into test bodies
      transport: don't ignore git-receive-pack(1) exit code on atomic push

 send-pack.c                     |  2 +-
 t/t5504-fetch-receive-strict.sh | 36 +++++++++++++++++-------------------
 t/t5543-atomic-push.sh          | 30 ++++++++++++++++++++++++++++++
 transport.c                     |  9 ++-------
 4 files changed, 50 insertions(+), 27 deletions(-)

---
base-commit: 25b0f41288718625b18495de23cc066394c09a92
change-id: 20241113-pks-push-atomic-respect-exit-code-436c443a657d