Skip to content

feat: add --stat output to commit view as 0th display format#2449

Draft
tonystr wants to merge 1 commit intotpope:masterfrom
tonystr:master
Draft

feat: add --stat output to commit view as 0th display format#2449
tonystr wants to merge 1 commit intotpope:masterfrom
tonystr:master

Conversation

@tonystr
Copy link
Copy Markdown

@tonystr tonystr commented Jan 17, 2026

Solves #2448

This PR adds a third fugitive_display_format to which simply includes --stat output in the commit message. Being the 0th display format (handles in the else, rather than an elseif), means that this format will be the default format shown when viewing commits (:Gedit <rev>). See appendix[0] for an image of how this looks.

PROBLEMS

    • The --stat output is not highlighted by the git parser for treesitter. This would require a PR to the treesitter git parser to solve.
    • Display format doesn't appear to be documented in fugitive's docs, this should be added.
    • Display format might not be the right way to handle this. Presumably, most users would prefer to always see --stat output or to never see --stat output. This should probably instead be handled by a config option.
    • If display format is to be kept, it should probably not be limited to a given range, rather than be represented as an arbitrary number.

APPENDIX
[0] - Fugitive :Gedit with --stat on the left, compared with Neogit's :NeogitCommit on the right
536990632-ece03424-976c-447f-ab79-c9d759dc5a24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant