author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | |
Thu, 1 Mar 2012 12:26:43 +0000 (13:26 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 1 Mar 2012 17:14:58 +0000 (09:14 -0800) | ||
commit | 1b058bc30df5f79fe7449cacd8ae7128944327f7 | |
tree | c07f24cd05a790beb104c86ea90b8cd401a45dae | tree | snapshot |
parent | 7a7159ace6c93ea6c55086dfc7ba7533a3e3c07d | commit | diff |
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>
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>
Documentation/diff-options.txt | diff | blob | history | |
diff.c | diff | blob | history | |
t/t4052-stat-output.sh | diff | blob | history |