Find a file
Alvaro Parker db404fc2e3
git: Add diff view for stash entries (#38280)
Continues the work from #35927 to add a git diff view for stash entries.

[Screencast From 2025-09-17
19-46-01.webm](https://github.com/user-attachments/assets/ded33782-adef-4696-8e34-3665911c09c7)

Stash entries are [represented as
commits](https://git-scm.com/docs/git-stash#_discussion) except they
have up to 3 parents:

```
       .----W (this is the stash entry)
      /    /|
-----H----I |
           \|
            U
```

Where `H` is the `HEAD` commit, `I` is a commit that records the state
of the index, and `U` is another commit that records untracked files
(when using `git stash -u`).

Given this, I modified the existing commit view struct to allow loading
stash and commits entries with git sha identifier so that we can get a
similar git diff view for both of them.

The stash diff is generated by comparing the stash commit with its
parent (`<commit>^` or `H` in the diagram) which generates the same diff
as doing `git stash show -p <stash entry>`. This *can* be
counter-intuitive since a user may expect the comparison to be made
between the stash commit and the current commit (`HEAD`), but given that
the default behavior in git cli is to compare with the stash parent, I
went for that approach.

Hoping to get some feedback from a Zed team member to see if they agree
with this approach.

Release Notes:

- Add git diff view for stash entries
- Add toolbar on git diff view for stash entries
- Prompt before executing a destructive stash action on diff view
- Fix commit view for merge commits  (see #38289)
2025-10-20 11:47:15 -04:00
.cargo perf: Fixes (#38935) 2025-09-26 05:41:06 +00:00
.cloudflare docs: Document context servers (#21170) 2024-11-25 11:05:14 -05:00
.config Remove workspace-hack (#40216) 2025-10-17 18:58:14 +00:00
.github Remove Windows beta issue template (#40650) 2025-10-19 19:29:09 +00:00
.zed Remove agent1 code (#40495) 2025-10-17 18:49:11 +02:00
assets git: Add diff view for stash entries (#38280) 2025-10-20 11:47:15 -04:00
crates git: Add diff view for stash entries (#38280) 2025-10-20 11:47:15 -04:00
docs docs: Add section about MCP servers with external agents (#40658) 2025-10-20 09:11:11 -03:00
extensions Add comment language injection for supported languages (#39884) 2025-10-20 14:45:51 +02:00
legal Fix the markdown table (#38729) 2025-09-23 16:49:45 +00:00
nix nix: Update flake, remove legacy Darwin SDK usage (#37254) 2025-08-31 14:09:09 -07:00
script Remove workspace-hack (#40216) 2025-10-17 18:58:14 +00:00
tooling perf: Add on search + fixups (#40537) 2025-10-17 22:11:09 +00:00
.clinerules Initial .rules file for agent with symlinks for other rules file paths (#29014) 2025-04-17 23:41:23 +00:00
.cursorrules Initial .rules file for agent with symlinks for other rules file paths (#29014) 2025-04-17 23:41:23 +00:00
.git-blame-ignore-revs Add PR 15352 to .git-blame-ignore-revs (#30870) 2025-05-17 11:35:58 +00:00
.gitattributes windows: Make sure zed.sh using the correct line ending (#37650) 2025-09-05 16:25:55 +00:00
.gitignore perf: Greatly expand profiler (#38584) 2025-09-21 13:54:59 +02:00
.mailmap Update .mailmap (#30874) 2025-05-17 12:34:42 +00:00
.prettierrc ci: Add check for formatting default.json (#30034) 2025-05-06 18:55:26 +00:00
.rules Fix small spelling mistakes (#38284) 2025-09-16 21:58:40 +00:00
.windsurfrules Initial .rules file for agent with symlinks for other rules file paths (#29014) 2025-04-17 23:41:23 +00:00
Cargo.lock search: New old search implementation (#39956) 2025-10-20 16:40:02 +02:00
Cargo.toml search: New old search implementation (#39956) 2025-10-20 16:40:02 +02:00
CLAUDE.md Initial .rules file for agent with symlinks for other rules file paths (#29014) 2025-04-17 23:41:23 +00:00
clippy.toml Remove agent1 code (#40495) 2025-10-17 18:49:11 +02:00
CODE_OF_CONDUCT.md Remove community content from docs and point to zed.dev (#19895) 2024-10-29 09:44:58 -04:00
compose.yml Fully qualify images in Docker Compose (#38496) 2025-09-19 10:12:49 -04:00
CONTRIBUTING.md Mention pure style changes in the contributing docs (#39096) 2025-09-29 11:02:47 +00:00
debug.plist WIP 2023-12-14 09:25:14 -07:00
default.nix Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
docker-compose.sql collab: Setup database for LLM service (#15882) 2024-08-06 17:18:08 -04:00
Dockerfile-collab Bump Rust to 1.90 (#38436) 2025-09-22 14:36:10 -07:00
Dockerfile-collab.dockerignore ci: Move collab to Dockerfile-collab (#18515) 2024-09-30 16:14:26 -04:00
Dockerfile-cross.dockerignore Add remote server cross compilation (#19136) 2024-10-12 23:23:56 -07:00
Dockerfile-distros Support More Linux (#18480) 2024-09-30 17:46:21 -04:00
Dockerfile-distros.dockerignore Support More Linux (#18480) 2024-09-30 17:46:21 -04:00
flake.lock Bump Rust to 1.90 (#38436) 2025-09-22 14:36:10 -07:00
flake.nix nix: Add job names and garnix substitutor (#31625) 2025-05-28 13:32:12 -07:00
GEMINI.md Add missing GEMINI.md rule file for gemini-cli (#38885) 2025-10-02 09:47:29 -04:00
LICENSE-AGPL Update license year (#24191) 2025-02-04 09:02:59 -05:00
LICENSE-APACHE Update license year (#24191) 2025-02-04 09:02:59 -05:00
LICENSE-GPL Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
livekit.yaml Add LiveKit server to Docker Compose (#7907) 2024-02-16 10:49:48 -05:00
lychee.toml ci: Check for broken links (#30844) 2025-06-06 09:39:35 +00:00
Procfile Update instructions for local collaboration (#35689) 2025-08-06 11:10:28 -07:00
Procfile.postgrest Fix llm queries (#16006) 2024-08-08 17:21:38 -07:00
Procfile.web Add a few more testing features (#36778) 2025-08-22 22:17:02 +00:00
README.md Restore Oxford comma in README (#40518) 2025-10-17 17:28:19 +00:00
renovate.json Remove workspace-hack (#40216) 2025-10-17 18:58:14 +00:00
rust-toolchain.toml Bump Rust to 1.90 (#38436) 2025-09-22 14:36:10 -07:00
shell.nix Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
typos.toml project panel: Make updates asynchronous (#38881) 2025-10-02 11:40:09 +05:30

Zed

Zed CI

Welcome to Zed, a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.


Installation

On macOS, Linux, and Windows you can download Zed directly or install Zed via your local package manager.

Other platforms are not yet available:

Developing Zed

Contributing

See CONTRIBUTING.md for ways you can contribute to Zed.

Also... we're hiring! Check out our jobs page for open roles.

Licensing

License information for third party dependencies must be correctly provided for CI to pass.

We use cargo-about to automatically comply with open source licenses. If CI is failing, check the following:

  • Is it showing a no license specified error for a crate you've created? If so, add publish = false under [package] in your crate's Cargo.toml.
  • Is the error failed to satisfy license requirements for a dependency? If so, first determine what license the project has and whether this system is sufficient to comply with this license's requirements. If you're unsure, ask a lawyer. Once you've verified that this system is acceptable add the license's SPDX identifier to the accepted array in script/licenses/zed-licenses.toml.
  • Is cargo-about unable to find the license for a dependency? If so, add a clarification field at the end of script/licenses/zed-licenses.toml, as specified in the cargo-about book.