Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Remove GitUiFeatureFlag and enable panel unconditionally (#26386)
Conrad Irwin659fae70f8c0
diff --git a/Cargo.lock b/Cargo.lockindex da7a2b126ab..051ffa281ac 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -5451,7 +5451,6 @@ dependencies = ["db","editor","env_logger 0.11.6",- "feature_flags","futures 0.3.31","fuzzy","git",diff --git a/crates/feature_flags/src/feature_flags.rs b/crates/feature_flags/src/feature_flags.rsindex a5dbef424f2..4e94ae302d0 100644--- a/crates/feature_flags/src/feature_flags.rs+++ b/crates/feature_flags/src/feature_flags.rs@@ -80,11 +80,6 @@ impl FeatureFlag for PredictEditsNonEagerModeFeatureFlag {}}-pub struct GitUiFeatureFlag;-impl FeatureFlag for GitUiFeatureFlag {- const NAME: &'static str = "git-ui";-}-pub struct Remoting {}impl FeatureFlag for Remoting {const NAME: &'static str = "remoting";diff --git a/crates/git_ui/Cargo.toml b/crates/git_ui/Cargo.tomlindex 43e2f030ec6..fe1a3bc9f03 100644--- a/crates/git_ui/Cargo.toml+++ b/crates/git_ui/Cargo.toml@@ -18,13 +18,12 @@ test-support = ["multi_buffer/test-support"][dependencies]anyhow.workspace = true-askpass.workspace= true+askpass.workspace = truebuffer_diff.workspace = truecollections.workspace = truecomponent.workspace = truedb.workspace = trueeditor.workspace = true-feature_flags.workspace = truefutures.workspace = truefuzzy.workspace = truegit.workspace = truediff --git a/crates/git_ui/src/project_diff.rs b/crates/git_ui/src/project_diff.rsindex 6af71ffb9d7..5d0ef6698d5 100644--- a/crates/git_ui/src/project_diff.rs+++ b/crates/git_ui/src/project_diff.rs@@ -7,7 +7,6 @@ use editor::{scroll::Autoscroll,Editor, EditorEvent,};-use feature_flags::FeatureFlagViewExt;use futures::StreamExt;use git::{repository::Branch, status::FileStatus, Commit, StageAll, StageAndNext, ToggleStaged,@@ -64,16 +63,13 @@ const NEW_NAMESPACE: &'static str = "2";impl ProjectDiff {pub(crate) fn register(- _: &mut Workspace,- window: Option<&mut Window>,+ workspace: &mut Workspace,+ _window: Option<&mut Window>,cx: &mut Context<Workspace>,) {- let Some(window) = window else { return };- cx.when_flag_enabled::<feature_flags::GitUiFeatureFlag>(window, |workspace, _, _cx| {- workspace.register_action(Self::deploy);- workspace.register_action(|workspace, _: &Add, window, cx| {- Self::deploy(workspace, &Diff, window, cx);- });+ workspace.register_action(Self::deploy);+ workspace.register_action(|workspace, _: &Add, window, cx| {+ Self::deploy(workspace, &Diff, window, cx);});workspace::register_serializable_item::<ProjectDiff>(cx);diff --git a/crates/zed/src/zed.rs b/crates/zed/src/zed.rsindex e3f7bccc01e..418568455c7 100644--- a/crates/zed/src/zed.rs+++ b/crates/zed/src/zed.rs@@ -20,7 +20,7 @@ use collections::VecDeque;use command_palette_hooks::CommandPaletteFilter;use editor::ProposedChangesEditorToolbar;use editor::{scroll::Autoscroll, Editor, MultiBuffer};-use feature_flags::{FeatureFlagAppExt, FeatureFlagViewExt, GitUiFeatureFlag};+use feature_flags::FeatureFlagAppExt;use futures::{channel::mpsc, select_biased, StreamExt};use git_ui::git_panel::GitPanel;use git_ui::project_diff::ProjectDiffToolbar;@@ -429,13 +429,11 @@ fn initialize_panels(workspace.add_panel(channels_panel, window, cx);workspace.add_panel(chat_panel, window, cx);workspace.add_panel(notification_panel, window, cx);- cx.when_flag_enabled::<GitUiFeatureFlag>(window, |workspace, window, cx| {- let entity = cx.entity();- let project = workspace.project().clone();- let app_state = workspace.app_state().clone();- let git_panel = cx.new(|cx| GitPanel::new(entity, project, app_state, window, cx));- workspace.add_panel(git_panel, window, cx);- });+ let entity = cx.entity();+ let project = workspace.project().clone();+ let app_state = workspace.app_state().clone();+ let git_panel = cx.new(|cx| GitPanel::new(entity, project, app_state, window, cx));+ workspace.add_panel(git_panel, window, cx);})?;let is_assistant2_enabled = if cfg!(test) {