zed/script
Thorsten Ball 7f54935324
Add git blame (#8889)
This adds a new action to the editor: `editor: toggle git blame`. When
used it turns on a sidebar containing `git blame` information for the
currently open buffer.

The git blame information is updated when the buffer changes. It handles
additions, deletions, modifications, changes to the underlying git data
(new commits, changed commits, ...), file saves. It also handles folding
and wrapping lines correctly.

When the user hovers over a commit, a tooltip displays information for
the commit that introduced the line. If the repository has a remote with
the name `origin` configured, then clicking on a blame entry opens the
permalink to the commit on the code host.

Users can right-click on a blame entry to get a context menu which
allows them to copy the SHA of the commit.

The feature also works on shared projects, e.g. when collaborating a
peer can request `git blame` data.

As of this PR, Zed now comes bundled with a `git` binary so that users
don't have to have `git` installed locally to use this feature.

### Screenshots

![screenshot-2024-03-28-13 57
43@2x](https://github.com/zed-industries/zed/assets/1185253/ee8ec55d-3b5e-4d63-a85a-852da914f5ba)

![screenshot-2024-03-28-14 01
23@2x](https://github.com/zed-industries/zed/assets/1185253/2ba8efd7-e887-4076-a87a-587a732b9e9a)
![screenshot-2024-03-28-14 01
32@2x](https://github.com/zed-industries/zed/assets/1185253/496f4a06-b189-4881-b427-2289ae6e6075)

### TODOs

- [x] Bundling `git` binary

### Release Notes

Release Notes:

- Added `editor: toggle git blame` command that toggles a sidebar with
git blame information for the current buffer.

---------

Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Piotr <piotr@zed.dev>
Co-authored-by: Bennet <bennetbo@gmx.de>
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-03-28 18:32:11 +01:00
..
danger
eula remoting (#9680) 2024-03-22 08:44:56 -06:00
lib Add GitHub Action for publishing the extension CLI (#9542) 2024-03-19 14:19:32 -04:00
licenses Fix license generation and Closure LSP repo link (#8876) 2024-03-05 10:43:02 +02:00
update_top_ranking_issues
bootstrap Make it (a tiny bit) easier to run your own collab (#9557) 2024-03-20 21:00:02 -06:00
bump-extension-cli Add a script for bumping the extension CLI (#9646) 2024-03-21 12:05:31 -04:00
bump-nightly
bump-zed-minor-versions Remove 0-patch requirement on main in bump-zed-minor-versions 2024-02-14 13:13:44 -05:00
bump-zed-patch-version
bundle-linux Adjust to newer logic from zed-industries/cargo-bundle (#9058) 2024-03-08 13:37:10 +02:00
bundle-mac Add git blame (#8889) 2024-03-28 18:32:11 +01:00
clear-target-dir-if-larger-than
clippy Add cargo xtask clippy (#8722) 2024-03-02 14:46:02 -05:00
collab-flamegraph Only 5s of data! (#8983) 2024-03-06 21:35:46 -07:00
crate-dep-graph
create-migration remoting (#9680) 2024-03-22 08:44:56 -06:00
deploy-collab just kidding (#7241) 2024-02-01 11:57:09 -07:00
deploy-postgrest
drop-test-dbs
gemini.py Allow AI interactions to be proxied through Zed's server so you don't need an API key (#7367) 2024-03-19 19:22:26 +01:00
generate-eula-rtf
generate-licenses Use upstream cargo-about 2024-03-22 22:12:24 -07:00
get-changes-since Format scripts with Prettier (#8393) 2024-02-25 11:03:33 -05:00
get-crate-version
get-preview-channel-changes get-preview-channel-changes errors on invalid token (#9616) 2024-03-20 21:44:12 -06:00
histogram
import-themes
kube-shell
linux Fix dependency install script on RHEL derivatives (#9684) 2024-03-25 11:14:11 -07:00
metal-debug
randomized-test-ci
randomized-test-minimize Format scripts with Prettier (#8393) 2024-02-25 11:03:33 -05:00
reset_db
run-local-minio Fix tracing subscriber after introducing Tokio-console (#8907) 2024-03-05 14:11:33 -08:00
script.py Allow AI interactions to be proxied through Zed's server so you don't need an API key (#7367) 2024-03-19 19:22:26 +01:00
seed-db Make it (a tiny bit) easier to run your own collab (#9557) 2024-03-20 21:00:02 -06:00
sqlx Allow AI interactions to be proxied through Zed's server so you don't need an API key (#7367) 2024-03-19 19:22:26 +01:00
squawk
storybook
symbolicate Fix ./script/symbolicate on Preview crashes (#8956) 2024-03-06 10:26:50 -07:00
upload-extension-cli Add GitHub Action for publishing the extension CLI (#9542) 2024-03-19 14:19:32 -04:00
upload-nightly Add GitHub Action for publishing the extension CLI (#9542) 2024-03-19 14:19:32 -04:00
what-is-deployed Deploy collab like nightly (#7174) 2024-02-01 11:54:49 -07:00
zed-local Make it (a tiny bit) easier to run your own collab (#9557) 2024-03-20 21:00:02 -06:00