summaryrefslogtreecommitdiffstats
path: root/gitattributes.txt
diff options
context:
space:
mode:
authorJunio C Hamano <junio@hera.kernel.org>2009-01-26 06:36:02 +0000
committerJunio C Hamano <junio@hera.kernel.org>2009-01-26 06:36:02 +0000
commit20d47e3f1442b9a7384b08ea40846c078f227a47 (patch)
tree0e2eafa5965e7d5044b5b7d3c6e5e16430b4865f /gitattributes.txt
parent22bcc112adfbdb908fb26cbdb2a89b0db95652a4 (diff)
downloadgit-htmldocs-20d47e3f1442b9a7384b08ea40846c078f227a47.tar.gz
Autogenerated HTML docs for v1.6.1.1-223-gc30e5
Diffstat (limited to 'gitattributes.txt')
-rw-r--r--gitattributes.txt21
1 files changed, 21 insertions, 0 deletions
diff --git a/gitattributes.txt b/gitattributes.txt
index 8af22ecca..227934f59 100644
--- a/gitattributes.txt
+++ b/gitattributes.txt
@@ -317,6 +317,8 @@ patterns are available:
- `bibtex` suitable for files with BibTeX coded references.
+- `cpp` suitable for source code in the C and C++ languages.
+
- `html` suitable for HTML/XHTML documents.
- `java` suitable for source code in the Java language.
@@ -334,6 +336,25 @@ patterns are available:
- `tex` suitable for source code for LaTeX documents.
+Customizing word diff
+^^^^^^^^^^^^^^^^^^^^^
+
+You can customize the rules that `git diff --color-words` uses to
+split words in a line, by specifying an appropriate regular expression
+in the "diff.*.wordRegex" configuration variable. For example, in TeX
+a backslash followed by a sequence of letters forms a command, but
+several such commands can be run together without intervening
+whitespace. To separate them, use a regular expression such as
+
+------------------------
+[diff "tex"]
+ wordRegex = "\\\\[a-zA-Z]+|[{}]|\\\\.|[^\\{}[:space:]]+"
+------------------------
+
+A built-in pattern is provided for all languages listed in the
+previous section.
+
+
Performing text diffs of binary files
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^