# Show type-changed files in commit diffs \(\#60422\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 04de6dab7c890d815e316f2f9554f9eeeaf8ebb2

Requested commit: 04de6dab7c890d815e316f2f9554f9eeeaf8ebb2

Commit: 04de6dab7c890d815e316f2f9554f9eeeaf8ebb2

Tree: e602b57ce3699ea8565d49c78187e64da13c8f1c

Author: Eagl61

Committer: GitHub

## Message

```
Show type-changed files in commit diffs (#60422)

# Objective

Zed ignores files marked by Git as type-changed (T), causing commits
containing only these changes to show 0 Changed Files.

For example, commit d7cc949e61351a6028f933abbaea39f67af9dfb2 changes
crates/eval_utils/LICENSE-GPL from a regular file to a symlink, but Zed
displays no changes.

  ## Solution

Handle TypeChanged files like modified files by loading both their old
and new contents.

  ## Testing

  - Added parser coverage for the T status.
  - Added a repository test for a regular-file-to-symlink change.
  - Ran cargo test -p git.
  - Ran ./script/clippy -p git.
  - Manually verified the example commit on macOS.

  ## 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

  ## Showcase

Before:
<img width="200" alt="image"
src="https://github.com/user-attachments/assets/277c5938-5c2c-47b7-902d-9061a14c062a"
/>

After:
<img width="200" alt="image"
src="https://github.com/user-attachments/assets/f99d0005-0712-4843-814e-d73b11f64782"
/>

  ———

  Release Notes:

- Fixed type-changed files not appearing in Git Graph and commit views.
```

## Parents

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

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