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

Re: [PATCH] No color diff when redirecting to file

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Jan 24, 2011, 09:38 UTC
Message-ID
<vpqtygyhcaq.fsf@bauges.imag.fr>
In-Reply-To
<201101240959.02852.saschpe@gmx.de>
Sascha Peilicke <saschpe@gmx.de> writes:
> try the same with
>
> git diff > foo

git diff > foo && cat foo => no color.

git diff --no-color > foo && cat foo => no color either

git diff --color=always > foo && cat foo => colors.

Again, just the expected behavior.
If it helps:

$ uname -a Linux bauges 2.6.36-686 #1 SMP PREEMPT Fri Nov 5 10:35:38 CET 2010 i686 GNU/Linux $ git --version git version 1.7.4.rc1.17.ge7ece

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Sascha PeilickeNext: Sascha Peilicke
Message 6 of 7 in “No color diff when redirecting to file”
  1. No color diff when redirecting to fileSascha Peilicke, Jan 23, 2011
  2. Johannes SixtJan 23, 2011
  3. Matthieu MoyJan 23, 2011
  4. Junio C HamanoJan 23, 2011
  5. Sascha PeilickeJan 24, 2011
  6. Matthieu MoyJan 24, 2011
  7. Sascha PeilickeJan 24, 2011

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.