From: Johannes Schindelin Date: Sun, 26 Jun 2016 06:57:32 GMT Subject: Re: [PATCH] diff: let --output= default to --no-color Message-ID: In-Reply-To: Hi Junio, On Fri, 24 Jun 2016, Junio C Hamano wrote: > Johannes Schindelin writes: > > > It is highly unlikely that any user would want to see ANSI color > > sequences in a file. So let's stop doing that by default. > > > > This is a backwards-incompatible change. > > > > The reason this was not caught earlier is most likely that either > > --output= is not used, or only when stdout is redirected > > anyway. > > > > Technically, we do not default to --no-color here. Instead, we try to > > override the GIT_COLOR_AUTO default because it would let want_color() > > test whether stdout (instead of the specified file) is connected to a > > terminal. Practically, we require the user to require color "always" > > to force writing ANSI color sequences to the output file. > > > > Signed-off-by: Johannes Schindelin > > --- > > Published-As: https://github.com/dscho/git/releases/tag/diff-o-v1 > > > > Just something I noted while working on a bit more consistency > > with the diffopt.file patches. > > > > This is a backwards-incompatible change, though. So I extracted it > > from the patch series. > > I think this is a bugfix. Okay. > Perhaps I should tweak 06/10 to assign GIT_COLOR_NEVER not 0 while > queuing it. Good point. Thanks, Dscho