Code

diff-options.txt: document the new "--dirstat" option
[git.git] / Documentation / diff-options.txt
index d0154bbc0a2f868b3f5f1c63dcffd1fc9355ebc3..01e7a578510f50af7365ec20e96d1538da424faa 100644 (file)
@@ -58,6 +58,14 @@ endif::git-format-patch[]
        number of modified files, as well as number of added and deleted
        lines.
 
+--dirstat[=limit]::
+       Output only the sub-directories that are impacted by a diff,
+       and to what degree they are impacted.  You can override the
+       default cut-off in percent (3) by "--dirstat=limit".  If you
+       want to enable "cumulative" directory statistics, you can use
+       the "--cumulative" flag, which adds up percentages recursively
+       even when they have been already reported for a sub-directory.
+
 --summary::
        Output a condensed summary of extended header information
        such as creations, renames and mode changes.
@@ -93,7 +101,9 @@ endif::git-format-patch[]
 
 --check::
        Warn if changes introduce trailing whitespace
-       or an indent that uses a space before a tab.
+       or an indent that uses a space before a tab. Exits with
+       non-zero status if problems are found. Not compatible with
+       --exit-code.
 
 --full-index::
        Instead of the first handful characters, show full
@@ -168,6 +178,14 @@ endif::git-format-patch[]
        Swap two inputs; that is, show differences from index or
        on-disk file to tree contents.
 
+--relative[=<path>]::
+       When run from a subdirectory of the project, it can be
+       told to exclude changes outside the directory and show
+       pathnames relative to it with this option.  When you are
+       not in a subdirectory (e.g. in a bare repository), you
+       can name which subdirectory to make the output relative
+       to by giving a <path> as an argument.
+
 --text::
        Treat all files as text.
 
@@ -175,19 +193,19 @@ endif::git-format-patch[]
        Shorthand for "--text".
 
 --ignore-space-at-eol::
-       Ignore changes in white spaces at EOL.
+       Ignore changes in whitespace at EOL.
 
 --ignore-space-change::
-       Ignore changes in amount of white space.  This ignores white
-       space at line end, and consider all other sequences of one or
-       more white space characters to be equivalent.
+       Ignore changes in amount of whitespace.  This ignores whitespace
+       at line end, and considers all other sequences of one or
+       more whitespace characters to be equivalent.
 
 -b::
        Shorthand for "--ignore-space-change".
 
 --ignore-all-space::
-       Ignore white space when comparing lines.  This ignores
-       difference even if one line has white space where the other
+       Ignore whitespace when comparing lines.  This ignores
+       differences even if one line has whitespace where the other
        line has none.
 
 -w::
@@ -203,11 +221,20 @@ endif::git-format-patch[]
 
 --ext-diff::
        Allow an external diff helper to be executed. If you set an
-       external diff driver with gitlink:gitattributes[5], you need
-       to use this option with gitlink:git-log[1] and friends.
+       external diff driver with linkgit:gitattributes[5], you need
+       to use this option with linkgit:git-log[1] and friends.
 
 --no-ext-diff::
        Disallow external diff drivers.
 
+--src-prefix=<prefix>::
+       Show the given source prefix instead of "a/".
+
+--dst-prefix=<prefix>::
+       Show the given destination prefix instead of "b/".
+
+--no-prefix::
+       Do not show any source or destination prefix.
+
 For more detailed explanation on these common options, see also
 link:diffcore.html[diffcore documentation].