From: Junio C Hamano Date: Wed, 18 Oct 2017 05:19:10 +0000 (+0900) Subject: Merge branch 'cc/subprocess-handshake-missing-capabilities' into maint X-Git-Tag: v2.15.0-rc2~5^2~22 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/1c45e39809ffc643987dd82037f43780605f1e92?hp=-c Merge branch 'cc/subprocess-handshake-missing-capabilities' into maint Finishing touches to a topic already in 'master'. * cc/subprocess-handshake-missing-capabilities: subprocess: loudly die when subprocess asks for an unsupported capability --- 1c45e39809ffc643987dd82037f43780605f1e92 diff --combined sub-process.c index 648b3a3943,ec9a51b7b1..80571567f2 --- a/sub-process.c +++ b/sub-process.c @@@ -74,12 -74,13 +74,12 @@@ int subprocess_start(struct hashmap *ha { int err; struct child_process *process; - const char *argv[] = { cmd, NULL }; entry->cmd = cmd; process = &entry->process; child_process_init(process); - process->argv = argv; + argv_array_push(&process->args, cmd); process->use_shell = 1; process->in = -1; process->out = -1; @@@ -180,8 -181,8 +180,8 @@@ static int handshake_capabilities(struc if (supported_capabilities) *supported_capabilities |= capabilities[i].flag; } else { - warning("subprocess '%s' requested unsupported capability '%s'", - process->argv[0], p); + die("subprocess '%s' requested unsupported capability '%s'", + process->argv[0], p); } }