Skip to content

Commit

Permalink
Documentation/diff: give --word-diff-regex=. example
Browse files Browse the repository at this point in the history
It's just so useful.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Jeff King <peff@peff.net>
  • Loading branch information
Michael J Gruber authored and Jeff King committed Nov 24, 2015
1 parent 5cb2e16 commit 2c15c00
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Documentation/diff-options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2c15c00

Please sign in to comment.