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

Re: A better git diff --word-diff (--word-diff-regex) ?

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Mar 19, 2012, 09:47 UTC
Message-ID
<vpqvcm0exc4.fsf@bauges.imag.fr>
In-Reply-To
<CAA01CsrJ12LmNYe6ujnDsZecJcGc8mFaB=1GC8-RZzvMYbYuUw@mail.gmail.com>
Piotr Krukowiecki <piotr.krukowiecki@gmail.com> writes:
> Hi,
>
> is there a way to configure --word-diff to be a more programming
> language friendly?
I often use this:
  git diff --color-words=.

It's rather bad on plain text, since it will try to diff within words, but works well on source code.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Piotr KrukowieckiNext: Piotr Krukowiecki
Message 2 of 7 in “A better git diff --word-diff (--word-diff-regex) ?”
  1. Piotr KrukowieckiMar 19, 2012
  2. Matthieu MoyMar 19, 2012
  3. Piotr KrukowieckiMar 19, 2012
  4. Thomas RastMar 19, 2012
  5. Piotr KrukowieckiMar 19, 2012
  6. Johannes SixtMar 19, 2012
  7. Jeff KingMar 19, 2012

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.