Re: [PATCHv4 3/5] run-command: add {run,start,finish}_command_or_die
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- Dec 20, 2016, 20:12 UTC
- Message-ID
- <f14ee492-8297-c8ec-f80f-f8f24caf91e1@kdbg.org>
- In-Reply-To
- <CAGZ79kYNKWfnEXWJfyRUutFyaQiRD9qW--LkK4Nbwdf7FtdPQA@mail.gmail.com>
Am 20.12.2016 um 20:23 schrieb Stefan Beller:
Show 5 quoted lines
> In a reroll I'll drop this patch and instead introduce > a function `char *get_child_command_line(struct child_process*);`, which > a caller can call before calling finish_command and then use the > resulting string > to assemble an error message without lego.
That sounds a lot better, thank you. Note though, that the function would have to be called before start_command(), because when it fails, it would be too late.
I have to ask, though: Is it so much necessary to report the exact command line in an error message? If someone is interested in which command failed, it would be "sufficient" to run the command under GIT_TRACE=2.
-- Hannes