mirror of
https://github.com/zed-industries/zed.git
synced 2026-05-24 13:39:08 +00:00
This branch: 1. teaches `--diff `command line option to to recurse into folders if provided. 2. Adds a `MultiDiffView` that shows _all_ changed files in a single, scrollable view. This is necessary to provide a smooth user experience for `jj` and Zed users who wish to use Zed as their jj difftool. I'm not fully sure how this change interacts with https://github.com/zed-industries/zed/pull/44936, or what plans y'all have in mind. Here's a screenshot of the resulting behavior: <img width="1090" height="950" alt="Screenshot 2025-12-17 at 9 10 52 AM" src="https://github.com/user-attachments/assets/8efd09b4-974f-4059-9f94-539c484c6d4a" /> I setup zed to handle jj diffs by adding the following to my jj config: ```toml [aliases] zdiff = ["diff", "--tool", "zed"] [merge-tools.zed] program = "/Users/dbarsky/Developer/zed/target/debug/cli" # omit diff-invocation-mode to keep the default (JJ passes two dirs) diff-args = [ "--zed", "/Users/dbarsky/Developer/zed/target/debug/zed", "--wait", "--new", "--diff", "$left", "$right", ] ``` Release Notes: - `--diff`, if provided with folders instead of files, will recurse into those directories. - Added a `MultiDiffView`, which will show all changed files within a single, scrollable view. **AI Disclosure**: Pretty much all of this code was written using Codex with GPT-5.1-Codex. I edited by hand and tested this. --------- Co-authored-by: Lukas Wirth <lukas@zed.dev> |
||
|---|---|---|
| .. | ||
| src | ||
| build.rs | ||
| Cargo.toml | ||
| LICENSE-GPL | ||
| README.md | ||
Cli
Testing
You can test your changes to the cli crate by first building the main zed binary:
cargo build -p zed
And then building and running the cli crate with the following parameters:
cargo run -p cli -- --zed ./target/debug/zed.exe