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

Re: [BUG] git-diff-* --color oddness

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 4, 2008, 08:35 UTC
Message-ID
<7v63yam1i9.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20080104082842.GA3300@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
> I'm not sure what you mean here. Are you saying that it is the desired
> behavior for "git-diff --color" to use my color.diff.* variables, but
> for "git-diff-files --color" not to?

What I meant is "git diff" without --color can be colorized because of config but we should never allow "git diff-files" without --color to be colorized by user's config. I realize that you were talking about the choice of colors, which is a different issue.

I do not much care ;-), but I guess we would want to be consistent.

> Not to mention the other bug (that diff-files _does_ read the config,
> just halfway through).

That one _is_ a bug. diff-files should not be affected by "diff.color = auto" or somesuch in the config, even when the user uses custom function header crap.

Previous: Jeff KingNext: Jeff King
Message 4 of 12 in “[BUG] git-diff-* --color oddness”
  1. Jeff KingJan 4, 2008
  2. Junio C HamanoJan 4, 2008
  3. Jeff KingJan 4, 2008
  4. Junio C HamanoJan 4, 2008
  5. Jeff KingJan 4, 2008
  6. Junio C HamanoJan 4, 2008
  7. Jeff KingJan 4, 2008
  8. Junio C HamanoJan 4, 2008
  9. Jeff KingJan 4, 2008
  10. Jeff KingJan 4, 2008
  11. Junio C HamanoJan 4, 2008
  12. Jeff KingJan 4, 2008

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.