summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorLibravatar Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2012-03-01 13:26:43 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-03-01 09:14:58 -0800
commit1b058bc30df5f79fe7449cacd8ae7128944327f7 (patch)
treec07f24cd05a790beb104c86ea90b8cd401a45dae /Documentation
parentmerge --stat: use the full terminal width (diff)
downloadtgif-1b058bc30df5f79fe7449cacd8ae7128944327f7.tar.xz
diff --stat: use a maximum of 5/8 for the filename part
The way that available columns are divided between the filename part and the graph part is modified to use as many columns as necessary for the filenames and the rest for the graph. If there isn't enough columns to print both the filename and the graph, at least 5/8 of available space is devoted to filenames. On a standard 80 column terminal, or if not connected to a terminal and using the default of 80 columns, this gives the same partition as before. The effect of this change is visible in the patch to the test vector in t4052; with a small change with long filename, it stops truncating the name part too short, and also allocates a bit more columns to the graph for larger changes. Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/diff-options.txt14
1 files changed, 8 insertions, 6 deletions
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 9f7cba2be6..6b9408fdd9 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -53,13 +53,15 @@ 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.
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>`.