Re: No config option for `git diff --stat` to always show the full file path and name (without .../ abbreviations)
- From
Jeff King <peff@peff.net>
- Date
- Oct 21, 2025, 08:14 UTC
- Message-ID
- <20251021081422.GE259661@coredump.intra.peff.net>
- In-Reply-To
- <a6ce209d120ca6acf0f5dd04521cb96ac1337a54.camel@aegee.org>
On Sun, Oct 19, 2025 at 09:46:10PM +0300, Дилян Палаузов wrote:
> * Please either alter the option `diff.statGraphWidth` to enlarge the > available space (broader than the terminal width), or add an option to > `git config` to set the available space for `--stat`. This option > should eventually allow always to print the full path and filenames.
It does seem funny that we have config options for 2 out of 3 of the numbers you can specify via --stat. So adding diff.statTotalWidth or something would make sense to me. I'd guess nobody has asked for it yet because it defaults to the terminal width, so a static config option risks overflowing your terminal if it's too high. On the other hand, if we are going to show it in a pager anyway, they usually support horizontal scrolling. And I guess it's all a matter of preference.
Anyway, one more possible hack: you can set COLUMNS if you want to pretend you have a really big terminal. I.e., "export COLUMNS=200" would probably do what you want without any new Git feature.
-Peff