All of lore.kernel.org
 help / color / mirror / Atom feed
* --color-diff='.' considered useful
@ 2015-11-16 14:25 Michael J Gruber
  2015-11-16 14:34 ` Matthieu Moy
  0 siblings, 1 reply; 4+ messages in thread
From: Michael J Gruber @ 2015-11-16 14:25 UTC (permalink / raw)
  To: Git Mailing List

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

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

* Re: --color-diff='.' considered useful
  2015-11-16 14:25 --color-diff='.' considered useful Michael J Gruber
@ 2015-11-16 14:34 ` Matthieu Moy
  2015-11-20 13:36   ` [PATCH] Documentation/diff: give --word-diff-regex=. example Michael J Gruber
  0 siblings, 1 reply; 4+ messages in thread
From: Matthieu Moy @ 2015-11-16 14:34 UTC (permalink / raw)
  To: Michael J Gruber; +Cc: Git Mailing List

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/

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

* [PATCH] Documentation/diff: give --word-diff-regex=. example
  2015-11-16 14:34 ` Matthieu Moy
@ 2015-11-20 13:36   ` Michael J Gruber
  2015-11-20 14:59     ` Matthieu Moy
  0 siblings, 1 reply; 4+ messages in thread
From: Michael J Gruber @ 2015-11-20 13:36 UTC (permalink / raw)
  To: git; +Cc: Matthieu Moy

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

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

* Re: [PATCH] Documentation/diff: give --word-diff-regex=. example
  2015-11-20 13:36   ` [PATCH] Documentation/diff: give --word-diff-regex=. example Michael J Gruber
@ 2015-11-20 14:59     ` Matthieu Moy
  0 siblings, 0 replies; 4+ messages in thread
From: Matthieu Moy @ 2015-11-20 14:59 UTC (permalink / raw)
  To: Michael J Gruber; +Cc: git

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/

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

end of thread, other threads:[~2015-11-20 15:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-16 14:25 --color-diff='.' considered useful Michael J Gruber
2015-11-16 14:34 ` Matthieu Moy
2015-11-20 13:36   ` [PATCH] Documentation/diff: give --word-diff-regex=. example Michael J Gruber
2015-11-20 14:59     ` Matthieu Moy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.