# git: Move diff hunk operations onto buffer diffs \(\#63556\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 229450844d2e34508b04e56d6f0dc5d2c6e382eb

Requested commit: 229450844d2e34508b04e56d6f0dc5d2c6e382eb

Commit: 229450844d2e34508b04e56d6f0dc5d2c6e382eb

Tree: 6b34ce2d86fcd17eb12c4c8fdbd9bfa2368f6540

Author: Ben Kunkle

Committer: GitHub

## Message

```
git: Move diff hunk operations onto buffer diffs (#63556)

# Objective

Keep Git-specific diff-base knowledge in `GitStore`, where Git
operations are defined.

Related to FR-135.

## Solution

Give each `BufferDiff` its supported hunk operations. Keep editor hooks
limited to rendering custom controls.

## 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 adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

---

Release Notes:

- N/A
```

## Parents

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

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