ZIm/crates/git_ui/src
Max Brunsfeld 8546dc101d
Allow viewing past commits in Zed (#27636)
This PR adds functionality for loading the diff for an arbitrary git
commit, and displaying it in a tab. To retrieve the diff for the commit,
I'm using a single `git cat-file --batch` invocation to efficiently load
both the old and new versions of each file that was changed in the
commit.

Todo

* Features
* [x] Open the commit view when clicking the most recent commit message
in the commit panel
  * [x] Open the commit view when clicking a SHA in a git blame column
  * [x] Open the commit view when clicking a SHA in a commit tooltip
  * [x] Make it work over RPC
  * [x] Allow buffer search in commit view
* [x] Command palette action to open the commit for the current blame
line
* Styling
* [x] Add a header that shows the author, timestamp, and the full commit
message
  * [x] Remove stage/unstage buttons in commit view
  * [x] Truncate the commit message in the tab
* Bugs
  * [x] Dedup commit tabs within a pane
  * [x] Add a tooltip to the tab

Release Notes:

- Added the ability to show past commits in Zed. You can view the most
recent commit by clicking its message in the commit panel. And when
viewing a git blame, you can show any commit by clicking its sha.
2025-03-31 23:26:47 +00:00
..
askpass_modal.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
blame_ui.rs Allow viewing past commits in Zed (#27636) 2025-03-31 23:26:47 +00:00
branch_picker.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
commit_message_prompt.txt git_ui: Try to prompt the model out of including the diff output (#26281) 2025-03-07 15:05:35 +00:00
commit_modal.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
commit_tooltip.rs Allow viewing past commits in Zed (#27636) 2025-03-31 23:26:47 +00:00
commit_view.rs Allow viewing past commits in Zed (#27636) 2025-03-31 23:26:47 +00:00
git_panel.rs Allow viewing past commits in Zed (#27636) 2025-03-31 23:26:47 +00:00
git_panel_settings.rs Add git init button (#26522) 2025-03-12 07:25:19 +00:00
git_ui.rs Allow viewing past commits in Zed (#27636) 2025-03-31 23:26:47 +00:00
onboarding.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
picker_prompt.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
project_diff.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
remote_output.rs Fix message on push (#26588) 2025-03-12 20:18:28 +00:00
repository_selector.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00