Show type-changed files in commit diffs#60422
Conversation
|
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Eagl61.
|
7108be3 to
ed3a445
Compare
|
We require contributors to sign our Contributor License Agreement, and we don't have @Eagl61 on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
|
@cla-bot check |
|
We require contributors to sign our Contributor License Agreement, and we don't have @Eagl61 on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
|
The cla-bot has been summoned, and re-checked this pull request! |
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
# 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 d7cc949 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.
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 d7cc949 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
Self-Review Checklist:
industries/zed/blob/main/crates/icons/README.md) guidelines)
Showcase
Before:

After:

———
Release Notes: