# git_ui: Open file diffs from git panel \(\#56152\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/5d3b9e467e9b789fa4422c4cf9208c497838d43b)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 5d3b9e467e9b789fa4422c4cf9208c497838d43b

Requested commit: 5d3b9e467e9b789fa4422c4cf9208c497838d43b

Commit: 5d3b9e467e9b789fa4422c4cf9208c497838d43b

Tree: dbfe35449119bdcf6714688c37584303c299fdd6

Author: Sathwik Chirivelli

Committer: GitHub

## Message

```
git_ui: Open file diffs from git panel (#56152)

Self-Review Checklist:
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Addresses https://github.com/zed-industries/zed/discussions/33773.

This changes git panel file activation so double-clicking or
secondary-opening a changed file opens a dedicated full-file diff tab
backed by a `SplittableEditor`.

The per-file diff reuses the project diff staging and restore controls,
respects the configured diff view style, and focuses an existing
per-file diff tab when one is already open instead of creating
duplicates.

Verified with `cargo run`.

Release Notes:

- Improved git panel file diff opening.

---------

Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com>
```

## Parents

- [06826ef10f7ebd89f79ff72bb652f45ccdbbe9af](https://git.cafe/gitcafe/zed/commit/06826ef10f7ebd89f79ff72bb652f45ccdbbe9af?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/5d3b9e467e9b789fa4422c4cf9208c497838d43b?format=markdown)
