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