git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git diff-index ignores color config
@ 2011-04-26 15:04 Elias Persson
  2011-04-26 17:42 ` Junio C Hamano
  0 siblings, 1 reply; 9+ messages in thread
From: Elias Persson @ 2011-04-26 15:04 UTC (permalink / raw)
  To: git

Having color.ui (and/or color.diff) set to auto, doing

   git diff-index --check <some refspec>

on a set with e.g. trailing whitespace does not produce colored
output.

If providing the option on the command line, e.g.

   git diff-index --check --color=auto <some refspec>

output _is_ colored, so obviously not an issue with tty
detection. Doesn't work when configured to 'true' either.


Documentation indicates that the config option is considered
(see under --no-color), so to me it seems like there's a bug
here, somewhere.


Most likely way of coming across this issue would be turning on
the shipped pre-commit hook sample, at least that's how I found
it. It ends (and does most of its work) with

    exec git diff-index --check --cached $against --

where $against is normally HEAD.


git --version: 1.7.4.4
uname -srio: Linux 2.6.35.12-88.fc14.i686 i386 GNU/Linux


// Delreich

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-04-28  7:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-26 15:04 git diff-index ignores color config Elias Persson
2011-04-26 17:42 ` Junio C Hamano
2011-04-27  7:20   ` Elias Persson
2011-04-27  7:38   ` [PATCH] config.txt,diff-options.txt: porcelain vs. plumbing for color.diff Michael J Gruber
2011-04-27  9:03     ` Jonathan Nieder
2011-04-27 16:39       ` Junio C Hamano
2011-04-27 18:30         ` Junio C Hamano
2011-04-27 22:12           ` Jonathan Nieder
2011-04-28  7:47             ` Michael J Gruber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).