Files
zed/assets
Michal Matczuk 051a638727 git_ui: Add commit view defaults for descriptions and files (#66331)
The commit view always opens with the description folded and all files
expanded.

This PR adds two settings so you can choose how it opens:

```json
"git": {
  "commit_view": {
    "expand_description": false,
    "expand_files": true
  }
}
```

Set `expand_description` to `true` to show the full commit message, or
`expand_files` to `false` to start with all changed files collapsed.
The defaults preserve the current behavior.
They are also available in Settings → Version Control → Git Commit View.
That section also absorbs the existing "Show Full File by Default"
setting from the former "File Diff" section, so everything for views
opened from a commit lives together. The JSON keys are unchanged.

The settings follow the existing `git.file_diff` pattern, and file
collapsing reuses the logic for folding binary files after the diff
loads.

Related: https://github.com/zed-industries/zed/discussions/64543

<!-- Add a screenshot of the "Git Commit View" section in Settings →
Version Control. -->

## Testing

Manually tested on Linux (Fedora 44, Wayland) with a debug build.



https://github.com/user-attachments/assets/d3db1251-de37-4978-9770-825dda15c0b0


## Self-review

- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [x] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [x] Tests cover the new or changed behavior.

Release Notes:

- Added `git.commit_view.expand_description` and
`git.commit_view.expand_files` to control whether the commit view opens
with the full commit message shown and the changed files expanded.
2026-11-09 11:03:27 +00:00
..
2026-10-26 13:46:57 +00:00