summaryrefslogtreecommitdiff
path: root/sub-process.c
diff options
context:
space:
mode:
authorChristian Couder <christian.couder@gmail.com>2017-08-16 12:40:36 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-08-16 16:40:33 (GMT)
commitd3ba566342a4fd81b24d926efc35506d58e10a19 (patch)
treed4fd4eebafad9436ad9e1adb1b0751c23fe90436 /sub-process.c
parentfa64a2fdbeedd98c5f24d1662bcc470a8449abcf (diff)
downloadgit-d3ba566342a4fd81b24d926efc35506d58e10a19.zip
git-d3ba566342a4fd81b24d926efc35506d58e10a19.tar.gz
git-d3ba566342a4fd81b24d926efc35506d58e10a19.tar.bz2
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>
Diffstat (limited to 'sub-process.c')
-rw-r--r--sub-process.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sub-process.c b/sub-process.c
index 86de8d7..fcc4832 100644
--- a/sub-process.c
+++ b/sub-process.c
@@ -181,8 +181,8 @@ static int handshake_capabilities(struct child_process *process,
if (supported_capabilities)
*supported_capabilities |= capabilities[i].flag;
} else {
- warning("external filter requested unsupported filter capability '%s'",
- p);
+ warning("subprocess '%s' requested unsupported capability '%s'",
+ process->argv[0], p);
}
}