submodule: port submodule subcommand 'status' from shell to C
[gitweb.git] / Documentation / diff-options.txt
index d91ddbd5fe490527bd3032789d0bf3f2eef93f93..a88c76741e781f5888fd467e17d02c633c87f15d 100644 (file)
@@ -192,10 +192,9 @@ ifndef::git-log[]
        given, do not munge pathnames and use NULs as output field terminators.
 endif::git-log[]
 +
-Without this option, each pathname output will have TAB, LF, double quotes,
-and backslash characters replaced with `\t`, `\n`, `\"`, and `\\`,
-respectively, and the pathname will be enclosed in double quotes if
-any of those replacements occurred.
+Without this option, pathnames with "unusual" characters are quoted as
+explained for the configuration variable `core.quotePath` (see
+linkgit:git-config[1]).
 
 --name-only::
        Show only names of changed files.
@@ -232,6 +231,40 @@ ifdef::git-diff[]
 endif::git-diff[]
        It is the same as `--color=never`.
 
+--color-moved[=<mode>]::
+       Moved lines of code are colored differently.
+ifdef::git-diff[]
+       It can be changed by the `diff.colorMoved` configuration setting.
+endif::git-diff[]
+       The <mode> defaults to 'no' if the option is not given
+       and to 'zebra' if the option with no mode is given.
+       The mode must be one of:
++
+--
+no::
+       Moved lines are not highlighted.
+default::
+       Is a synonym for `zebra`. This may change to a more sensible mode
+       in the future.
+plain::
+       Any line that is added in one location and was removed
+       in another location will be colored with 'color.diff.newMoved'.
+       Similarly 'color.diff.oldMoved' will be used for removed lines
+       that are added somewhere else in the diff. This mode picks up any
+       moved line, but it is not very useful in a review to determine
+       if a block of code was moved without permutation.
+zebra::
+       Blocks of moved text of at least 20 alphanumeric characters
+       are detected greedily. The detected blocks are
+       painted using either the 'color.diff.{old,new}Moved' color or
+       'color.diff.{old,new}MovedAlternative'. The change between
+       the two colors indicates that a new block was detected.
+dimmed_zebra::
+       Similar to 'zebra', but additional dimming of uninteresting parts
+       of moved code is performed. The bordering lines of two adjacent
+       blocks are considered interesting, the rest is uninteresting.
+--
+
 --word-diff[=<mode>]::
        Show a word diff, using the <mode> to delimit changed words.
        By default, words are delimited by whitespace; see
@@ -301,15 +334,14 @@ ifndef::git-format-patch[]
        with --exit-code.
 
 --ws-error-highlight=<kind>::
-       Highlight whitespace errors on lines specified by <kind>
-       in the color specified by `color.diff.whitespace`.  <kind>
-       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`.
-       The `diff.wsErrorHighlight` configuration variable can be
-       used to specify the default behaviour.
+       Highlight whitespace errors in the `context`, `old` or `new`
+       lines of the diff.  Multiple values are separated by comma,
+       `none` resets previous values, `default` reset the list to
+       `new` and `all` is a shorthand for `old,new,context`.  When
+       this option is not given, and the configuration variable
+       `diff.wsErrorHighlight` is not set, only whitespace errors in
+       `new` lines are highlighted. The whitespace errors are colored
+       whith `color.diff.whitespace`.
 
 endif::git-format-patch[]
 
@@ -393,7 +425,7 @@ endif::git-log[]
        the diff between the preimage and `/dev/null`. The resulting patch
        is not meant to be applied with `patch` or `git apply`; this is
        solely for people who want to just concentrate on reviewing the
-       text after the change. In addition, the output obviously lack
+       text after the change. In addition, the output obviously lacks
        enough information to apply such a patch in reverse, even manually,
        hence the name of the option.
 +