transport-helper: use write helpers more consistently
commitcf7335f5b6e93a45a07fabe9360582322b607eec
authorJeff King <peff@peff.net>
Wed, 20 Mar 2024 09:34:17 +0000 (20 05:34 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 20 Mar 2024 17:00:55 +0000 (20 10:00 -0700)
tree67cd245b5e784e57d3d1067f6cc4ac0f160648f0
parente09f1254c54329773904fe25d7c545a1fb4fa920
transport-helper: use write helpers more consistently

The transport-helper code provides some functions for writing to the
helper process, but there are a few spots that don't use them. We should
do so consistently because:

  1. They detect errors on write (though in practice this means the
     helper process went away, and we'd see the problem as soon as we
     try to read the response).

  2. They dump the written bytes to the GIT_TRANSPORT_HELPER_DEBUG
     stream. It's doubly confusing to miss some writes but not others,
     as you see a partial conversation.

The "list" ones go all the way back to the beginning of the transport
helper code; they were just missed when most writes were converted in
bf3c523c3f (Add remote helper debug mode, 2009-12-09). The nearby
"object-format" write presumably just cargo-culted them, as it's only a
few lines away.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
transport-helper.c