zed
zed copied to clipboard
WIP: `git blame` prototypin'
Release Notes:
- Added/Fixed/Improved ... (#<public_issue_number_if_exists>).
Optionally, include screenshots / media showcasing your addition that can be included in the release notes.
or
- N/A
This will be a very handy feature. This is out of scope for now but, while I use blame in VSCode, 99% of the time it's a hover to see which PR introduced the commit and to click the link to view the PR on Github.
Oooooh! If this prototype goes through, this will be super awesome!
Current preview:
https://github.com/zed-industries/zed/assets/1185253/d9a65982-2b0f-4254-8f22-37811fd25fb4
Collaboration works! Now all that's left is bundling git and incorporating more design feedback :)
https://github.com/zed-industries/zed/assets/1185253/0db7714c-6253-45ef-ac55-77925ad71d6f
bundled git binary also works!
@mrnugget I've been using this in main and it's wonderful! Sorry for the unrelated, probably dumb question, but I've done a cargo run --release to get a Zed executable. Are there instructions somewhere to get a Mac "app" like you have there that I can run similarly to Preview/Stable releases?
Update: nvm, I see a bundle-mac script; I'll poke around with that.
Even though this is merged, I have a question @mrnugget. I'm curious as to why the code cannot just use git2::Blame for this. git2::Blame has Blame::blame_buffer which I believe would do the same thing as calling git blame --contents. I'm not sure what benefits we get by doing a --incremental especially since we wait for the command to exit.
@baldwindavid yep, that's the one. scripts/bundle-mac.
@mmtftr because it's very, very slow. See here: https://github.com/libgit2/libgit2/issues/3027 Running git blame on crates/editor/src/editor.rs in this repository here took 40s, vs 600ms shelling out to git. --incremental in this case is only used for its machine-readable output.