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

Re: diff settings

From
Jeff King <peff@peff.net>
Date
Jan 24, 2009, 19:22 UTC
Message-ID
<20090124192222.GA18010@coredump.intra.peff.net>
In-Reply-To
<alpine.GSO.2.00.0901240936080.23073@kiwi.cs.ucla.edu>
On Sat, Jan 24, 2009 at 09:38:18AM -0800, Keith Cascio wrote:
> How do I configure my local git so that diff always obeys a particular
> option, e.g. "-w", without needing to type it on the command line each
> time?

AFAIK, there is not a way to do it in the general case (though there are specific config options for things like rename support). When I refactored the gitattributes diff=$foo code a few months back, I tried to keep in mind the possibility of a "diff options" field. But I never actually implemented anything, as I don't personally ever use diff options in such a way.

If you're interested, it would probably not be too hard to implement (see userdiff.[ch], and the external and textconv code in diff.c for a start).

-Peff
Previous: Keith CascioNext: Teemu Likonen
Message 2 of 13 in “diff settings”
  1. Keith CascioJan 24, 2009
  2. Jeff KingJan 24, 2009
  3. Teemu LikonenJan 24, 2009
  4. Keith CascioJan 24, 2009
  5. Ted PavlicJan 25, 2009
  6. Keith CascioJan 25, 2009
  7. Ted PavlicJan 26, 2009
  8. Ted PavlicJan 29, 2009
  9. Johannes SchindelinJan 29, 2009
  10. Keith CascioJan 29, 2009
  11. Nanako ShiraishiJan 29, 2009
  12. Ted PavlicJan 31, 2009
  13. Keith CascioJan 31, 2009

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.