Re: [PATCH 5/5] format-patch: avoid freopen()
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Jun 19, 2016, 20:01 UTC
- Message-ID
- <CAPig+cTiexRhzS3MwMEntGYxKms-XQvtoc7HOnUGJvDaBSK7JA@mail.gmail.com>
- In-Reply-To
- <de218a6cc529b3f5c33dc4b8282f16fd8a5329a8.1466244194.git.johannes.schindelin@gmx.de>
On Sat, Jun 18, 2016 at 6:04 AM, Johannes Schindelin <johannes.schindelin@gmx.de> wrote:
Show 11 quoted lines
> We just taught the relevant functions to respect the diffopt.file field,
> to allow writing somewhere else than stdout. Let's make use of it.
> [...]
> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> ---
> diff --git a/builtin/log.c b/builtin/log.c
> @@ -1569,6 +1570,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
> setup_pager();
>
> if (output_directory) {
> + rev.diffopt.use_color = 0;What is this change about? It doesn't seem to be related to anything else in the patch.
> if (use_stdout)
> die(_("standard output, or directory, which one?"));
> if (mkdir(output_directory, 0777) < 0 && errno != EEXIST)