Re: [GSoC][PATCH 1/3] sequencer: add a new function to silence a command, except if it fails.
- From
Alban Gruin <alban.gruin@gmail.com>
- Date
- Jun 18, 2018, 16:46 UTC
- Message-ID
- <deae16f0-8852-4b98-dc14-705d8456f219@gmail.com>
- In-Reply-To
- <b23a9e30-58bf-afde-4d77-563e0b288e70@talktalk.net>
Hi Phillip,
Le 18/06/2018 à 17:26, Phillip Wood a écrit :
Show 15 quoted lines
> Hi Alban > > On 18/06/18 14:18, Alban Gruin wrote: >> This adds a new function, run_command_silent_if_successful(), to >> redirect the stdout and stderr of a command to a strbuf, and then to run >> that command. This strbuf is printed only if the command fails. It is >> functionnaly similar to output() from git-rebase.sh. > > s/functionnaly/functionally/ > > It's not quite the same though because the shell versions handles > --verbose where as here the caller has to put that check in every call > site. I wonder if it would simplify the callers if the C version did the > --verbose handling it's self. >
That’s what I did first, but removed it because I thought it would be less confusing. I’m fine with this solution, though. Do you want me to do this instead?
Cheers, Alban