diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2012-03-01 13:26:46 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-03-01 09:15:58 -0800 |
commit | df44483a5dde62f4b49c80fd90d7fe12ddcfb084 (patch) | |
tree | 10979081b6b5ec2e143e27841a6094db974dac14 /builtin/diff.c | |
parent | diff --stat: enable limiting of the graph part (diff) | |
download | tgif-df44483a5dde62f4b49c80fd90d7fe12ddcfb084.tar.xz |
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>
Diffstat (limited to 'builtin/diff.c')
-rw-r--r-- | builtin/diff.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/diff.c b/builtin/diff.c index 81b6baec74..424c815f9b 100644 --- a/builtin/diff.c +++ b/builtin/diff.c @@ -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); |