sub-process: print the cmd when a capability is unsupported
commitd3ba566342a4fd81b24d926efc35506d58e10a19
authorChristian Couder <christian.couder@gmail.com>
Wed, 16 Aug 2017 12:40:36 +0000 (16 14:40 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 16 Aug 2017 16:40:33 +0000 (16 09:40 -0700)
treed4fd4eebafad9436ad9e1adb1b0751c23fe90436
parentfa64a2fdbeedd98c5f24d1662bcc470a8449abcf
sub-process: print the cmd when a capability is unsupported

In handshake_capabilities() we use warning() when a capability
is not supported, so the exit code of the function is 0 and no
further error is shown. This is a problem because the warning
message doesn't tell us which subprocess cmd failed.

On the contrary if we cannot write a packet from this function,
we use error() and then subprocess_start() outputs:

    initialization for subprocess '<cmd>' failed

so we can know which subprocess cmd failed.

Let's improve the warning() message, so that we can know which
subprocess cmd failed.

Helped-by: Lars Schneider <larsxschneider@gmail.com>
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sub-process.c