[RFC] New configuration option "diff.statNameWidth"
- From
- Dragan Simic <dsimic@manjaro.org>
- Date
- Sep 2, 2023, 18:03 UTC
- Message-ID
- <eb8f524eca3975f086715ec32a8a1fbb@manjaro.org>
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