sincecutoff.com
← all changes

jj diff.stat limits stat bar width

Introduced 2026-08-06 · score 0.92

HOW TO USE IT

When reviewing diff statistics in a narrow layout, set `diff.stat.max-bar-width` to cap the `++--` bar while using `--stat`. For template output, `diff.stat()` accepts an optional `max_bar_width` argument for the same effect.

[diff.stat] max-bar-width = 10 jj show --stat
jj diff -T 'diff.stat(max_bar_width=10)'

WHY THIS HELPS

When reviewing diff statistics in a narrow output layout, limit the `++--` bar width.

REQUIREMENTS AND LIMITATIONS

  • Version: v0.44.0
  • diff.stat.max-bar-width: Maximum character width of the `++--` bar in diff stat output; without it, the bar uses remaining available space, with a minimum of 30% of total width.
  • --stat: Enables diff stat output; the release note says the new config option applies when using it.
  • diff.stat() max_bar_width: Optional second positional or named integer argument limiting the maximum character length of the `++--` bar. The template docs also list an optional first `width` argument; they do not state that the arguments are mutually exclusive.
  • The `max_bar_width` argument to `diff.stat()` is optional and may be positional or named.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card