[RFC] New configuration option "diff.statNameWidth"

From: Dragan Simic <hidden>
Date: 2023-09-02 18:11:56

Hello,

I'd like to implement support for a new configuration option named 
"diff.statNameWidth" and submit the patch, so I'd like to check first 
would that patch be accepted and merged.

Similarly to the already existing configuration option 
"diff.statGraphWidth",[1][2] "diff.statNameWidth" as a new configuration 
option would limit the width of the filename part in generated diffstat 
outputs, just like the command-line option "--stat-name-width=<n>" 
already does.

Having "diff.statNameWidth" as a new configuration option would be quite 
usable, and it would fit together nicely with the already existing 
"diff.statGraphWidth" configuration option.  For exaple, I have quite a 
few aliases in my ~/.gitconfig that contain "--stat-name-width=<n>", and 
having this new configuration option would allow those aliases to be 
much shorter.  Of course, it would benefit all other uses in which 
diffstats are generated.

Please advise.

Links:
[1] 
https://git-scm.com/docs/git-diff#Documentation/git-diff.txt---statltwidthgtltname-widthgtltcountgt
[2] 
https://git-scm.com/docs/git-config#Documentation/git-config.txt-diffstatGraphWidth
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help