diff options
author | Dragan Simic <dsimic@manjaro.org> | 2023-09-11 17:39:44 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-09-18 09:39:07 -0700 |
commit | bd48adc31d0522e7877aa494ce7df91581e09587 (patch) | |
tree | 453a553971c3d0127271fa77ddfbe34d700b6612 /Documentation/config | |
parent | bda494f4043963b9ec9a1ecd4b19b7d1cd9a0518 (diff) | |
download | git-bd48adc31d0522e7877aa494ce7df91581e09587.tar.gz |
diff --stat: add config option to limit filename width
Add new configuration option diff.statNameWidth=<width> that is equivalent
to the command-line option --stat-name-width=<width>, but it is ignored
by format-patch. This follows the logic established by the already
existing configuration option diff.statGraphWidth=<width>.
Limiting the widths of names and graphs in the --stat output makes sense
for interactive work on wide terminals with many columns, hence the support
for these configuration options. They don't affect format-patch because
it already adheres to the traditional 80-column standard.
Update the documentation and add more tests to cover new configuration
option diff.statNameWidth=<width>. While there, perform a few minor code
and whitespace cleanups here and there, as spotted.
Signed-off-by: Dragan Simic <dsimic@manjaro.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/config')
-rw-r--r-- | Documentation/config/diff.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Documentation/config/diff.txt b/Documentation/config/diff.txt index 35a7bf86d7..9391c77e55 100644 --- a/Documentation/config/diff.txt +++ b/Documentation/config/diff.txt @@ -52,6 +52,10 @@ directories with less than 10% of the total amount of changed files, and accumulating child directory counts in the parent directories: `files,10,cumulative`. +diff.statNameWidth:: + Limit the width of the filename part in --stat output. If set, applies + to all commands generating --stat output except format-patch. + diff.statGraphWidth:: Limit the width of the graph part in --stat output. If set, applies to all commands generating --stat output except format-patch. |