Subject: Re: [PATCH v2] receive-pack: add option to interrupt pre-receive when client exits

From: Junio C Hamano <[email-masked]>
Date: Thu, 27 Jan 2022 15:47:34 -0800

"Robin Jarry" <[email-masked]> writes:

> My main goal is to abort a push if a user hits ctrl-c (or is
> disconnected) before the objects have been moved to permanent storage.
>
> But this always leads to errors on the client side when receive-pack
> sends the "keepalive packet":

Yes, you'd need to make all three new combinations work if you touch
the protocol.  An updated "receive-pack" must be inter-operable with
a vanilla "push" as well as an updated "push", and an updated "push"
must be inter-operable with a vanilla "receive-pack".

You'd need to invent a new protocol capability, advertise it on the
updated "receive-pack" side, and the updated "push" must check if
the capability is advertized before asking to activate it.  Then
only after both ends discover that the other side knows how to deal
with "keepalive" packets, use that feature.