From: Junio C Hamano Date: Sun, 13 Jun 2010 18:22:27 +0000 (-0700) Subject: Merge branch 'jk/diff-m-doc' X-Git-Tag: v1.7.2-rc0~70 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/b0fd34ecd5a386b7b09a0161413c50f957ac181e?ds=inline;hp=-c Merge branch 'jk/diff-m-doc' * jk/diff-m-doc: docs: clarify meaning of -M for git-log --- b0fd34ecd5a386b7b09a0161413c50f957ac181e diff --combined Documentation/diff-options.txt index 0d89aaaf2a,3070dddfe2..e745a3ccdc --- a/Documentation/diff-options.txt +++ b/Documentation/diff-options.txt @@@ -21,7 -21,6 +21,7 @@@ endif::git-format-patch[ ifndef::git-format-patch[] -p:: -u:: +--patch:: Generate patch (see section on generating patches). {git-diff? This is the default.} endif::git-format-patch[] @@@ -127,39 -126,11 +127,39 @@@ any of those replacements occurred gives the default to color output. Same as `--color=never`. ---color-words[=]:: - Show colored word diff, i.e., color words which have changed. - By default, words are separated by whitespace. +--word-diff[=]:: + Show a word diff, using the to delimit changed words. + By default, words are delimited by whitespace; see + `--word-diff-regex` below. The defaults to 'plain', and + must be one of: ++ +-- +color:: + Highlight changed words using only colors. Implies `--color`. +plain:: + Show words as `[-removed-]` and `{+added+}`. Makes no + attempts to escape the delimiters if they appear in the input, + so the output may be ambiguous. +porcelain:: + 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 `+`/`-`/` ` + character at the beginning of the line and extending to the + end of the line. Newlines in the input are represented by a + tilde `~` on a line of its own. +none:: + Disable word diff again. +-- ++ +Note that despite the name of the first mode, color is used to +highlight the changed parts in all modes if enabled. + +--word-diff-regex=:: + Use to decide what a word is, instead of considering + runs of non-whitespace to be a word. Also implies + `--word-diff` unless it was already enabled. + -When a is specified, every non-overlapping match of the +Every non-overlapping match of the is considered a word. Anything between these matches is considered whitespace and ignored(!) for the purposes of finding differences. You may want to append `|[^[:space:]]` to your regular @@@ -171,10 -142,6 +171,10 @@@ The regex can also be set via a diff dr linkgit:gitattributes[1] or linkgit:git-config[1]. Giving it explicitly overrides any diff driver or configuration setting. Diff drivers override configuration settings. + +--color-words[=]:: + Equivalent to `--word-diff=color` plus (if a regex was + specified) `--word-diff-regex=`. endif::git-format-patch[] --no-renames:: @@@ -210,7 -177,14 +210,14 @@@ endif::git-format-patch[ Break complete rewrite changes into pairs of delete and create. -M:: + ifndef::git-log[] Detect renames. + endif::git-log[] + ifdef::git-log[] + If generating diffs, detect and report renames for each commit. + For following files across renames while traversing history, see + `--follow`. + endif::git-log[] -C:: Detect copies as well as renames. See also `--find-copies-harder`.