Documentation / diff-options.txton commit Merge branch 'maint' (f596157)
   1-p::
   2        Generate patch (see section on generating patches)
   3
   4-u::
   5        Synonym for "-p".
   6
   7--raw::
   8        Generate the raw format.
   9
  10--patch-with-raw::
  11        Synonym for "-p --raw".
  12
  13--stat[=width[,name-width]]::
  14        Generate a diffstat.  You can override the default
  15        output width for 80-column terminal by "--stat=width".
  16        The width of the filename part can be controlled by
  17        giving another width to it separated by a comma.
  18
  19--summary::
  20        Output a condensed summary of extended header information
  21        such as creations, renames and mode changes.
  22
  23--patch-with-stat::
  24        Synonym for "-p --stat".
  25
  26-z::
  27        \0 line termination on output
  28
  29--name-only::
  30        Show only names of changed files.
  31
  32--name-status::
  33        Show only names and status of changed files.
  34
  35--color::
  36        Show colored diff.
  37
  38--no-color::
  39        Turn off colored diff, even when the configuration file
  40        gives the default to color output.
  41
  42--color-words::
  43        Show colored word diff, i.e. color words which have changed.
  44
  45--no-renames::
  46        Turn off rename detection, even when the configuration
  47        file gives the default to do so.
  48
  49--full-index::
  50        Instead of the first handful characters, show full
  51        object name of pre- and post-image blob on the "index"
  52        line when generating a patch format output.
  53
  54--binary::
  55        In addition to --full-index, output "binary diff" that
  56        can be applied with "git apply".
  57
  58--abbrev[=<n>]::
  59        Instead of showing the full 40-byte hexadecimal object
  60        name in diff-raw format output and diff-tree header
  61        lines, show only handful hexdigits prefix.  This is
  62        independent of --full-index option above, which controls
  63        the diff-patch output format.  Non default number of
  64        digits can be specified with --abbrev=<n>.
  65
  66-B::
  67        Break complete rewrite changes into pairs of delete and create.
  68
  69-M::
  70        Detect renames.
  71
  72-C::
  73        Detect copies as well as renames.
  74
  75--diff-filter=[ACDMRTUXB*]::
  76        Select only files that are Added (`A`), Copied (`C`),
  77        Deleted (`D`), Modified (`M`), Renamed (`R`), have their
  78        type (mode) changed (`T`), are Unmerged (`U`), are
  79        Unknown (`X`), or have had their pairing Broken (`B`).
  80        Any combination of the filter characters may be used.
  81        When `*` (All-or-none) is added to the combination, all
  82        paths are selected if there is any file that matches
  83        other criteria in the comparison; if there is no file
  84        that matches other criteria, nothing is selected.
  85
  86--find-copies-harder::
  87        For performance reasons, by default, -C option finds copies only 
  88        if the original file of the copy was modified in the same 
  89        changeset.  This flag makes the command
  90        inspect unmodified files as candidates for the source of
  91        copy.  This is a very expensive operation for large
  92        projects, so use it with caution.
  93
  94-l<num>::
  95        -M and -C options require O(n^2) processing time where n
  96        is the number of potential rename/copy targets.  This
  97        option prevents rename/copy detection from running if
  98        the number of rename/copy targets exceeds the specified
  99        number.
 100
 101-S<string>::
 102        Look for differences that contain the change in <string>.
 103
 104--pickaxe-all::
 105        When -S finds a change, show all the changes in that
 106        changeset, not just the files that contain the change
 107        in <string>.
 108
 109--pickaxe-regex::
 110        Make the <string> not a plain string but an extended POSIX
 111        regex to match.
 112
 113-O<orderfile>::
 114        Output the patch in the order specified in the
 115        <orderfile>, which has one shell glob pattern per line.
 116
 117-R::
 118        Swap two inputs; that is, show differences from index or
 119        on-disk file to tree contents.
 120
 121--text::
 122        Treat all files as text.
 123
 124-a::
 125        Shorthand for "--text".
 126
 127For more detailed explanation on these common options, see also
 128link:diffcore.html[diffcore documentation].