From 61757aa02bdc2e1d6556b35bd8c3c35fc01e2367 Mon Sep 17 00:00:00 2001 From: Dino Date: Mon, 23 Feb 2026 15:23:32 +0000 Subject: [PATCH] git: Remove unused actions (#49901) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove both `git::LoadMoreHistory` and `git::ViewCommitFromHistory` actions as although both actions were registered in the workspace, they don't actually have effect when run. This appears to have been leftover from https://github.com/zed-industries/zed/pull/42441 , possibly the initial implementation on how to open a commit and load more commits when the file history view was open, which is now handled with `Button.on_click` callbacks instead of relying on actions. Closes #49288 Release Notes: - Removed unused git actions – `git: load more history` and `git: view commit from history` --- crates/git_ui/src/file_history_view.rs | 12 +----------- crates/git_ui/src/git_ui.rs | 1 - 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/crates/git_ui/src/file_history_view.rs b/crates/git_ui/src/file_history_view.rs index 9f60efe8ccc1bc2fe8bdc1111965a085189104f6..0925828447b5d1baeb4cee60b7b14e4b62dcd56b 100644 --- a/crates/git_ui/src/file_history_view.rs +++ b/crates/git_ui/src/file_history_view.rs @@ -5,7 +5,7 @@ use git::{GitHostingProviderRegistry, GitRemote, parse_git_remote_url}; use gpui::{ AnyElement, AnyEntity, App, Asset, Context, Entity, EventEmitter, FocusHandle, Focusable, IntoElement, Render, ScrollStrategy, Task, UniformListScrollHandle, WeakEntity, Window, - actions, uniform_list, + uniform_list, }; use project::{ Project, ProjectPath, @@ -24,16 +24,6 @@ use workspace::{ use crate::commit_view::CommitView; -actions!(git, [ViewCommitFromHistory, LoadMoreHistory]); - -pub fn init(cx: &mut App) { - cx.observe_new(|workspace: &mut Workspace, _window, _cx| { - workspace.register_action(|_workspace, _: &ViewCommitFromHistory, _window, _cx| {}); - workspace.register_action(|_workspace, _: &LoadMoreHistory, _window, _cx| {}); - }) - .detach(); -} - const PAGE_SIZE: usize = 50; pub struct FileHistoryView { diff --git a/crates/git_ui/src/git_ui.rs b/crates/git_ui/src/git_ui.rs index ca7063d18336fa4fcfdb2883ac78d1c1dff2f54f..e19eb8c21f9bf8a3eb88e4804d2a977ffb97e31c 100644 --- a/crates/git_ui/src/git_ui.rs +++ b/crates/git_ui/src/git_ui.rs @@ -50,7 +50,6 @@ pub mod worktree_picker; pub fn init(cx: &mut App) { editor::set_blame_renderer(blame_ui::GitBlameRenderer, cx); commit_view::init(cx); - file_history_view::init(cx); cx.observe_new(|editor: &mut Editor, _, cx| { conflict_view::register_editor(editor, editor.buffer().clone(), cx);