Skip to content

Add commitDisplayFormat option with normal/comfortable/spacious modes#5846

Open
alexeRadu wants to merge 1 commit into
jesseduffield:masterfrom
alexeRadu:commit-display-format
Open

Add commitDisplayFormat option with normal/comfortable/spacious modes#5846
alexeRadu wants to merge 1 commit into
jesseduffield:masterfrom
alexeRadu:commit-display-format

Conversation

@alexeRadu

Copy link
Copy Markdown

Add a git.log.commitDisplayFormat user config controlling how commits are rendered in the commits and sub-commits panels, switchable at runtime from the log menu (ctrl+l):

  • normal: the existing one-line-per-commit layout
  • comfortable: two lines per commit, with author and date on an indented second line, freeing the full width for the subject
  • spacious: like comfortable, plus an empty graph row between commits

The extra lines are implemented as non-model items (like section headers), so commit-level navigation, search and selection are unaffected. Each inserted line starts with the graph's connector characters (rendered from the same cached pipe sets as the commit rows) so branch lanes remain continuous, including the selection highlight of the selected commit's path.

Claude-Session: https://claude.ai/code/session_01MacRoM2ci19SpyNzGnpr9S

PR Description

Please check if the PR fulfills these requirements

  • Cheatsheets are up-to-date (run go generate ./...)
  • Code has been formatted (see here)
  • Tests have been added/updated (see here for the integration test guide)
  • Text is internationalised (see here)
  • If a new UserConfig entry was added, make sure it can be hot-reloaded (see here)
  • Docs have been updated if necessary
  • You've read through your own file changes for silly mistakes etc

Add a git.log.commitDisplayFormat user config controlling how commits
are rendered in the commits and sub-commits panels, switchable at
runtime from the log menu (ctrl+l):

- normal: the existing one-line-per-commit layout
- comfortable: two lines per commit, with author and date on an
  indented second line, freeing the full width for the subject
- spacious: like comfortable, plus an empty graph row between commits

The extra lines are implemented as non-model items (like section
headers), so commit-level navigation, search and selection are
unaffected. Each inserted line starts with the graph's connector
characters (rendered from the same cached pipe sets as the commit
rows) so branch lanes remain continuous, including the selection
highlight of the selected commit's path.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MacRoM2ci19SpyNzGnpr9S
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