diff options
author | Junio C Hamano <junio@kernel.org> | 2010-05-21 14:57:53 +0000 |
---|---|---|
committer | Junio C Hamano <junio@kernel.org> | 2010-05-21 14:57:53 +0000 |
commit | cc7636a7aa705986cedababd3173cad477491003 (patch) | |
tree | d5f2c5aeadb840264c0881528637d5c124b615a7 /git-diff.html | |
parent | e97d5771c3fcb22302e27b6f962375a059cdcb13 (diff) | |
download | git-htmldocs-cc7636a7aa705986cedababd3173cad477491003.tar.gz |
Autogenerated HTML docs for v1.7.1-226-g770c5
Diffstat (limited to 'git-diff.html')
-rw-r--r-- | git-diff.html | 74 |
1 files changed, 69 insertions, 5 deletions
diff --git a/git-diff.html b/git-diff.html index 0a01f71e5..850616994 100644 --- a/git-diff.html +++ b/git-diff.html @@ -597,14 +597,69 @@ any of those replacements occurred.</p></div> </p>
</dd>
<dt>
---color-words[=<regex>]
+--word-diff[=<mode>]
+</dt>
+<dd>
+<p>
+ Show a word diff, using the <mode> to delimit changed words.
+ By default, words are delimited by whitespace; see
+ <tt>--word-diff-regex</tt> below. The <mode> defaults to <em>plain</em>, and
+ must be one of:
+</p>
+<div class="vlist"><dl>
+<dt>
+color
+</dt>
+<dd>
+<p>
+ Highlight changed words using only colors. Implies <tt>--color</tt>.
+</p>
+</dd>
+<dt>
+plain
+</dt>
+<dd>
+<p>
+ Show words as <tt>[-removed-]</tt> and <tt>{+added+}</tt>. Makes no
+ attempts to escape the delimiters if they appear in the input,
+ so the output may be ambiguous.
+</p>
+</dd>
+<dt>
+porcelain
+</dt>
+<dd>
+<p>
+ Use a special line-based format intended for script
+ consumption. Added/removed/unchanged runs are printed in the
+ usual unified diff format, starting with a <tt>+</tt>/<tt>-</tt>/<tt> </tt>
+ character at the beginning of the line and extending to the
+ end of the line. Newlines in the input are represented by a
+ tilde <tt>~</tt> on a line of its own.
+</p>
+</dd>
+<dt>
+none
+</dt>
+<dd>
+<p>
+ Disable word diff again.
+</p>
+</dd>
+</dl></div>
+<div class="para"><p>Note that despite the name of the first mode, color is used to
+highlight the changed parts in all modes if enabled.</p></div>
+</dd>
+<dt>
+--word-diff-regex=<regex>
</dt>
<dd>
<p>
- Show colored word diff, i.e., color words which have changed.
- By default, words are separated by whitespace.
+ Use <regex> to decide what a word is, instead of considering
+ runs of non-whitespace to be a word. Also implies
+ <tt>--word-diff</tt> unless it was already enabled.
</p>
-<div class="para"><p>When a <regex> is specified, every non-overlapping match of the
+<div class="para"><p>Every non-overlapping match of the
<regex> is considered a word. Anything between these matches is
considered whitespace and ignored(!) for the purposes of finding
differences. You may want to append <tt>|[^[:space:]]</tt> to your regular
@@ -617,6 +672,15 @@ overrides any diff driver or configuration setting. Diff drivers override configuration settings.</p></div>
</dd>
<dt>
+--color-words[=<regex>]
+</dt>
+<dd>
+<p>
+ Equivalent to <tt>--word-diff=color</tt> plus (if a regex was
+ specified) <tt>--word-diff-regex=<regex></tt>.
+</p>
+</dd>
+<dt>
--no-renames
</dt>
<dd>
@@ -1641,7 +1705,7 @@ Output diff in reverse. </div>
<div id="footer">
<div id="footer-text">
-Last updated 2010-05-19 08:13:31 UTC
+Last updated 2010-05-21 14:57:17 UTC
</div>
</div>
</body>
|