git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] diff: let --output=<file> default to --no-color

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jun 26, 2016, 06:57 UTC
Message-ID
<alpine.DEB.2.20.1606260856480.12947@virtualbox>
In-Reply-To
<xmqqshw2dyks.fsf@gitster.mtv.corp.google.com>
Hi Junio,
On Fri, 24 Jun 2016, Junio C Hamano wrote:
Show 28 quoted lines
> Johannes Schindelin <johannes.schindelin@gmx.de> 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=<file> 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 <johannes.schindelin@gmx.de>
> > ---
> > 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

Previous: Junio C Hamano
Message 3 of 3 in “diff: let --output=<file> default to --no-color”
  1. diff: let --output=<file> default to --no-colorJohannes Schindelin, Jun 22, 2016
  2. Junio C HamanoJun 24, 2016
  3. Johannes SchindelinJun 26, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.