# --color-diff='.' considered useful

4 messages from 2015-11-16 to 2015-11-20. Participants: Michael J Gruber, Matthieu Moy.
Thread: https://gitlist.dev/t/40807

## Michael J Gruber, 2015-11-16 14:25

Subject: --color-diff='.' considered useful
Message-ID: <5649E773.7040705@drmicha.warpmail.net>
URL: https://gitlist.dev/e/5649E773.7040705%40drmicha.warpmail.net

```
git tip of the day:

git diff --color-words='.'
git show --color-words='.'

That will help you find that 1 character change that a failed default
word split hides from your eyes.﻿

I guess everyone here will know already, but I found that super useful
and much easier than trying to get a meaningful word split for that 100+
char TeX source line without a single space...

Cheers,
Michael

```

## Matthieu Moy, 2015-11-16 14:34

Subject: Re: --color-diff='.' considered useful
Message-ID: <vpq1tbq812p.fsf@anie.imag.fr>
URL: https://gitlist.dev/e/vpq1tbq812p.fsf%40anie.imag.fr
In-Reply-To: <5649E773.7040705@drmicha.warpmail.net>

```
Michael J Gruber <git@drmicha.warpmail.net> writes:

> git tip of the day:
>
> git diff --color-words='.'
> git show --color-words='.'

Probably my main usage of --color-words indeed (except I omit the single
quotes ;-) ).

I think this deserves an explicit mention in the doc.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

```

## Michael J Gruber, 2015-11-20 13:36

Subject: [PATCH] Documentation/diff: give --word-diff-regex=. example
Message-ID: <6697f80b679b2bc910aa02a0fc945453be38c532.1448026505.git.git@drmicha.warpmail.net>
URL: https://gitlist.dev/e/6697f80b679b2bc910aa02a0fc945453be38c532.1448026505.git.git%40drmicha.warpmail.net
In-Reply-To: <vpq1tbq812p.fsf@anie.imag.fr>

```
It's just so useful.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
---
 Documentation/diff-options.txt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index d56ca90..306b7e3 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -267,6 +267,9 @@ expression to make sure that it matches all non-whitespace characters.
 A match that contains a newline is silently truncated(!) at the
 newline.
 +
+For example, `--word-diff-regex=.` will treat each character as a word
+and, correspondingly, show differences character by character.
++
 The regex can also be set via a diff driver or configuration option, see
 linkgit:gitattributes[1] or linkgit:git-config[1].  Giving it explicitly
 overrides any diff driver or configuration setting.  Diff drivers
-- 
2.6.3.507.gca54332

```

## Matthieu Moy, 2015-11-20 14:59

Subject: Re: [PATCH] Documentation/diff: give --word-diff-regex=. example
Message-ID: <vpq1tbkhg2n.fsf@anie.imag.fr>
URL: https://gitlist.dev/e/vpq1tbkhg2n.fsf%40anie.imag.fr
In-Reply-To: <6697f80b679b2bc910aa02a0fc945453be38c532.1448026505.git.git@drmicha.warpmail.net>

```
Michael J Gruber <git@drmicha.warpmail.net> writes:

> It's just so useful.

Confirmed-by: Matthieu Moy <Matthieu.Moy@imag.fr>

Thanks,

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

```
