Re: [GSoC][PATCH v2 1/3] sequencer: add a new function to silence a command, except if it fails.

2018-06-21 Thread Alban Gruin
Hi Johannes, Le 21/06/2018 à 11:37, Johannes Schindelin a écrit : > Hi Alban, > > On Tue, 19 Jun 2018, Alban Gruin wrote: > >> diff --git a/sequencer.c b/sequencer.c >> index 7cc76332e..9aa7ddb33 100644 >> --- a/sequencer.c >> +++ b/sequencer.c >> @@ -766,6 +766,29 @@ N_("you have staged

Re: [GSoC][PATCH v2 1/3] sequencer: add a new function to silence a command, except if it fails.

2018-06-21 Thread Johannes Schindelin
Hi Alban, On Tue, 19 Jun 2018, Alban Gruin wrote: > diff --git a/sequencer.c b/sequencer.c > index 7cc76332e..9aa7ddb33 100644 > --- a/sequencer.c > +++ b/sequencer.c > @@ -766,6 +766,29 @@ N_("you have staged changes in your working tree\n" > #define VERIFY_MSG (1<<4) > #define

[GSoC][PATCH v2 1/3] sequencer: add a new function to silence a command, except if it fails.

2018-06-19 Thread Alban Gruin
This adds a new function, run_command_silent_on_success(), 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 also takes a parameter, “verbose”. When true, the command is executed without redirecting its