diff --stat: add config option to limit graph width
Config option diff.statGraphWidth=<width> is equivalent to --stat-graph-width=<width>, except that the config option is ignored by format-patch. For the graph-width limiting to be usable, it should happen 'automatically' once configured, hence the config option. Nevertheless, graph width limiting only makes sense when used on a wide terminal, so it should not influence the output of format-patch, which adheres to the 80-column standard. Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
969fe57b84
commit
df44483a5d
@ -285,8 +285,9 @@ int cmd_diff(int argc, const char **argv, const char *prefix)
|
||||
/* Otherwise, we are doing the usual "git" diff */
|
||||
rev.diffopt.skip_stat_unmatch = !!diff_auto_refresh_index;
|
||||
|
||||
/* Scale to real terminal size */
|
||||
/* Scale to real terminal size and respect statGraphWidth config */
|
||||
rev.diffopt.stat_width = -1;
|
||||
rev.diffopt.stat_graph_width = -1;
|
||||
|
||||
/* Default to let external and textconv be used */
|
||||
DIFF_OPT_SET(&rev.diffopt, ALLOW_EXTERNAL);
|
||||
|
||||
Reference in New Issue
Block a user