Skip to content

Show type-changed files in commit diffs#60422

Merged
ChristopherBiscardi merged 1 commit into
zed-industries:mainfrom
Eagl61:type-changed-commit-diffs
Jul 6, 2026
Merged

Show type-changed files in commit diffs#60422
ChristopherBiscardi merged 1 commit into
zed-industries:mainfrom
Eagl61:type-changed-commit-diffs

Conversation

@Eagl61

@Eagl61 Eagl61 commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

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:

  • I've reviewed my own diff for quality, security, and reliability
  • Unsafe blocks (if any) have justifying comments
  • The content adheres to Zed's UI standards (UX/UI and [icon](https://github.com/zed-
    industries/zed/blob/main/crates/icons/README.md) guidelines)
  • Tests cover the new/changed behavior
  • Performance impact has been considered and is acceptable

Showcase

Before:
image

After:
image

———

Release Notes:

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

@cla-bot

cla-bot Bot commented Jul 5, 2026

Copy link
Copy Markdown

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Eagl61.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@zed-community-bot zed-community-bot Bot added the first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions label Jul 5, 2026
@Eagl61 Eagl61 force-pushed the type-changed-commit-diffs branch from 7108be3 to ed3a445 Compare July 5, 2026 15:13
@cla-bot

cla-bot Bot commented Jul 5, 2026

Copy link
Copy Markdown

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'.

@Eagl61

Eagl61 commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

@cla-bot check

@cla-bot

cla-bot Bot commented Jul 5, 2026

Copy link
Copy Markdown

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

cla-bot Bot commented Jul 5, 2026

Copy link
Copy Markdown

The cla-bot has been summoned, and re-checked this pull request!

@Eagl61

Eagl61 commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

@cla-bot check

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Jul 5, 2026
@cla-bot

cla-bot Bot commented Jul 5, 2026

Copy link
Copy Markdown

The cla-bot has been summoned, and re-checked this pull request!

@zed-industries-bot

Copy link
Copy Markdown
Contributor
Warnings
⚠️

This PR is missing release notes.

Please add a "Release Notes" section that describes the change:

Release Notes:

- Added/Fixed/Improved ...

If your change is not user-facing, you can use "N/A" for the entry:

Release Notes:

- N/A

Generated by 🚫 dangerJS against ed3a445

@ChristopherBiscardi ChristopherBiscardi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@ChristopherBiscardi ChristopherBiscardi added this pull request to the merge queue Jul 6, 2026
Merged via the queue into zed-industries:main with commit 04de6da Jul 6, 2026
44 checks passed
TakuroBreath pushed a commit to TakuroBreath/zed that referenced this pull request Jul 7, 2026
# 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants