Code

diff --stat: add config option to limit graph width
[git.git] / Documentation / diff-options.txt
index 66624a17698ac91cfcd6d45d1af6024c4bf066d9..87f0a5fb8f1b74332d0a9ce6579bc5d8d0f00ef3 100644 (file)
@@ -53,13 +53,19 @@ endif::git-format-patch[]
        Generate a diff using the "patience diff" algorithm.
 
 --stat[=<width>[,<name-width>[,<count>]]]::
-       Generate a diffstat.  You can override the default
-       output width for 80-column terminal by `--stat=<width>`.
-       The width of the filename part can be controlled by
-       giving another width to it separated by a comma.
+       Generate a diffstat. By default, as much space as necessary
+       will be used for the filename part, and the rest for the graph
+       part. Maximum width defaults to terminal width, or 80 columns
+       if not connected to a terminal, and can be overriden by
+       `<width>`. The width of the filename part can be limited by
+       giving another width `<name-width>` after a comma. The width
+       of the graph part can be limited by using
+       `--stat-graph-width=<width>` (affects all commands generating
+       a stat graph) or by setting `diff.statGraphWidth=<width>`
+       (does not affect `git format-patch`).
        By giving a third parameter `<count>`, you can limit the
-       output to the first `<count>` lines, followed by
-       `...` if there are more.
+       output to the first `<count>` lines, followed by `...` if
+       there are more.
 +
 These parameters can also be set individually with `--stat-width=<width>`,
 `--stat-name-width=<name-width>` and `--stat-count=<count>`.
@@ -408,6 +414,10 @@ endif::git-format-patch[]
        Show the context between diff hunks, up to the specified number
        of lines, thereby fusing hunks that are close to each other.
 
+-W::
+--function-context::
+       Show whole surrounding functions of changes.
+
 ifndef::git-format-patch[]
 ifndef::git-log[]
 --exit-code::