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