Ancestors

Toot

Written by Paul Moore on 2024-08-15 at 01:55

FWIW, I never found a good solution for this, but it turns out it isn't that difficult to mimic the git request-pull output in a script and many of the git commands you need have mechanisms to limit their line lengths.

=> More informations about this toot | More toots from securepaul@fosstodon.org

Descendants

Written by Vegard Nossum on 2024-08-15 at 06:14

@securepaul git request-pull is itself just a shell script. It seems to be using 'git diff -M --stat --summary' for the diffstat -- and the git diff man page documents that it defaults to 80 columns when not outputting to a terminal; do you just need to pipe it through 'cat' to get the right width? Otherwise the man page also documents a diff.statGraphWidth= config option that you can pass like this: git -c diff.statGraphWidth=10 request-pull ...

=> More informations about this toot | More toots from vegard@mastodon.social

Written by Paul Moore on 2024-08-15 at 15:44

@vegard thanks, but the trick is that I don't want to affect git's diffstat output outside of the request-pull command, and if memory serves the diff.statGraphWidth didn't seem to apply to the request-pull output, but I may be misremembering that since I tried it last.

It turns out writing your own replacement has other advantages (passing '-wX' to the shortlog output, automatically adjusting the commit subject wrapping in the "body" of the PR, etc.).

=> More informations about this toot | More toots from securepaul@fosstodon.org

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/112963545115560210
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
268.297255 milliseconds
Gemini-to-HTML Time
1.212728 milliseconds

This content has been proxied by September (3851b).