From: Junio C Hamano Date: Mon, 25 Jul 2016 21:13:41 +0000 (-0700) Subject: Merge branch 'jc/doc-diff-filter-exclude' X-Git-Tag: v2.10.0-rc0~89 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/c3531e03856972b698df61c983a3375892220d51?ds=inline;hp=-c Merge branch 'jc/doc-diff-filter-exclude' Belated doc update for a feature added in v1.8.5. * jc/doc-diff-filter-exclude: diff: document diff-filter exclusion --- c3531e03856972b698df61c983a3375892220d51 diff --combined Documentation/diff-options.txt index d9ae681d8f,073c7e58f4..705a873942 --- a/Documentation/diff-options.txt +++ b/Documentation/diff-options.txt @@@ -26,12 -26,12 +26,12 @@@ ifndef::git-format-patch[ ifdef::git-diff[] This is the default. endif::git-diff[] -endif::git-format-patch[] -s:: --no-patch:: Suppress diff output. Useful for commands like `git show` that show the patch by default, or to cancel the effect of `--patch`. +endif::git-format-patch[] -U:: --unified=:: @@@ -63,13 -63,6 +63,13 @@@ ifndef::git-format-patch[ Synonym for `-p --raw`. endif::git-format-patch[] +--compaction-heuristic:: +--no-compaction-heuristic:: + These are to help debugging and tuning an experimental + heuristic (which is off by default) that shifts the hunk + boundary in an attempt to make the resulting patch easier + to read. + --minimal:: Spend extra time to make sure the smallest possible diff is produced. @@@ -274,11 -267,8 +274,11 @@@ expression to make sure that it matche 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 +linkgit:gitattributes[5] or linkgit:git-config[1]. Giving it explicitly overrides any diff driver or configuration setting. Diff drivers override configuration settings. @@@ -293,24 -283,14 +293,24 @@@ endif::git-format-patch[ ifndef::git-format-patch[] --check:: - Warn if changes introduce whitespace errors. What are - considered whitespace errors is controlled by `core.whitespace` + Warn if changes introduce conflict markers or whitespace errors. + What are considered whitespace errors is controlled by `core.whitespace` configuration. By default, trailing whitespaces (including lines that solely consist of whitespaces) and a space character that is immediately followed by a tab character inside the initial indent of the line are considered whitespace errors. Exits with non-zero status if problems are found. Not compatible with --exit-code. + +--ws-error-highlight=:: + Highlight whitespace errors on lines specified by + in the color specified by `color.diff.whitespace`. + is a comma separated list of `old`, `new`, `context`. When + this option is not given, only whitespace errors in `new` + lines are highlighted. E.g. `--ws-error-highlight=new,old` + highlights whitespace errors on both deleted and added lines. + `all` can be used as a short-hand for `old,new,context`. + endif::git-format-patch[] --full-index:: @@@ -419,6 -399,9 +419,9 @@@ ifndef::git-format-patch[ paths are selected if there is any file that matches other criteria in the comparison; if there is no file that matches other criteria, nothing is selected. + + + Also, these upper-case letters can be downcased to exclude. E.g. + `--diff-filter=ad` excludes added and deleted paths. -S:: Look for differences that change the number of occurrences of