Re: [PATCH 5/5] format-patch: avoid freopen()
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 21, 2016, 16:50 UTC
- Message-ID
- <xmqqvb12qyeu.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <alpine.DEB.2.20.1606210906190.22630@virtualbox>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> That is a very convincing argument. So convincing that I wanted to change > the patch to guard behind `diff_use_color_default == GIT_COLOR_AUTO`.
I actually was expecting, instead of your:
if (output_directory) {
+ rev.diffopt.use_color = 0;
if (use_stdout)
die(_("standard output, or directory, which one?"));an update would say
if (output_directory) {
if (rev.diffopt.use_color == GIT_COLOR_AUTO)
rev.diffopt.use_color = 0;
if (use_stdout)
die(_("standard output, or directory, which one?"));I didn't expect you to check diff_use_color_default exactly for the reason why you say "But that is the wrong variable".