Re: [PATCH] No color diff when redirecting to file
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Jan 23, 2011, 17:29 UTC
- Message-ID
- <vpq39oj4jfz.fsf@bauges.imag.fr>
- In-Reply-To
- <201101231547.18529.j6t@kdbg.org>
Johannes Sixt <j6t@kdbg.org> writes:
> That said, I cannot reproduce. Perhaps your configuration says > color.ui=always? If so, then this is expected behavior and not a bug, IMO.
I think you're right.
I tested this (without the patch):
git diff => I get color, because I have color.ui = auto
git diff | cat => I don't get color
git diff --color=auto | cat => no color
git diff --color=always | cat => colors, because I've asked
this seems to be just the right behavior.
-- Matthieu Moy http://www-verimag.imag.fr/~moy/