Re: [PATCH 83/83] builtin/am: use apply api in run_apply()
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Apr 25, 2016, 15:03 UTC
- Message-ID
- <alpine.DEB.2.20.1604251701180.2896@virtualbox>
- In-Reply-To
- <1461505189-16234-4-git-send-email-chriscool@tuxfamily.org>
Hi Chris,
On Sun, 24 Apr 2016, Christian Couder wrote:
Show 13 quoted lines
> [...]
> /*
> * If we are allowed to fall back on 3-way merge, don't give false
> * errors during the initial attempt.
> */
> +
> if (state->threeway && !index_file) {
> - cp.no_stdout = 1;
> - cp.no_stderr = 1;
> + save_stdout_fd = dup(1);
> + dup_devnull(1);
> + save_stderr_fd = dup(2);
> + dup_devnull(2);I wonder. It should be possible to teach the apply function to be quiet by default, yes? That would be more elegant than dup()ing back and forth.
Ciao, Dscho