git/list[1] front-page[2] threads[3] people[4] search[5] about
 

No config option for `git diff --stat` to always show the full file path and name (without .../ abbreviations)

From
ДПДилян Палаузов <dilyan.palauzov@aegee.org>
Date
Oct 19, 2025, 18:46 UTC
Message-ID
<a6ce209d120ca6acf0f5dd04521cb96ac1337a54.camel@aegee.org>
Hello,
After `git diff --stat` determines the available width, it uses correctly all available space for the file paths and names:
```
$ git show --stat --oneline 
0fb93104ba (HEAD -> java223/main) SourceGenerator: avoid delayed actions after the bundle is deactivated
 .../main/java/org/openhab/automation/java223/internal/Java223ScriptEngineFactory.java    |  1 +
 .../java/org/openhab/automation/java223/internal/codegeneration/SourceGenerator.java     | 16 +++++++++++-----
 2 files changed, 12 insertions(+), 5 deletions(-)
```
https://git-scm.com/docs/git-diff#Documentation/git-diff.txt---statwidthname-widthcount describes that after --stat can be entered up to three numbers, two of which can be set by a config option.  The same options apply also for show --stat : https://git-scm.com/docs/git-show#Documentation/git-show.txt---statwidthname-widthcount .
I set in /etc/gitconfig:
[diff]
        statGraphWidth = 200
        statNameWidth = 200
which is effectively the same as calling:
```
$ git show --stat-graph-width=200 --stat-graph-width=200 --oneline
0fb93104ba (HEAD -> java223/main) SourceGenerator: avoid delayed actions after the bundle is deactivated
 .../main/java/org/openhab/automation/java223/internal/Java223ScriptEngineFactory.java    |  1 +
 .../java/org/openhab/automation/java223/internal/codegeneration/SourceGenerator.java     | 16 +++++++++++-----
 2 files changed, 12 insertions(+), 5 deletions(-)
```
There is no difference.  diff.statGraphWidth / diff.statNameWidth / --stat-graph-width= / --stat-graph-width=200 set some number of columns within the available space.  But I want to change the size of the available space to defaut to 200 (or to infinity).
The reason is that I can then copy the file path (e.g. with the mouse) from the git --stat output and open it immediately with less or emacs.
* 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.
Greetings
  Дилян
---
git 2.51.0
Next: Ben Knoble
Message 1 of 5 in “No config option for `git diff --stat` to always show the full file path and name (without .../ abbreviations)”
  1. Дилян ПалаузовOct 19, 2025
  2. Ben KnobleOct 20, 2025
  3. Jeff KingOct 21, 2025
  4. Junio C HamanoOct 21, 2025
  5. Jeff KingOct 22, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.