From d078bc54eb8eb8665edb743affe26f435dcc589d Mon Sep 17 00:00:00 2001 From: dino Date: Wed, 3 Dec 2025 11:11:40 +0000 Subject: [PATCH] chore(git_panel): prevent footer and header rendering on no git access --- crates/git_ui/src/git_panel.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crates/git_ui/src/git_panel.rs b/crates/git_ui/src/git_panel.rs index d74c9a8a7b..c95383521f 100644 --- a/crates/git_ui/src/git_panel.rs +++ b/crates/git_ui/src/git_panel.rs @@ -3944,6 +3944,10 @@ impl GitPanel { window: &mut Window, cx: &mut Context, ) -> Option { + if matches!(self.git_access, GitAccess::No) { + return None; + } + self.active_repository.as_ref()?; let (text, action, stage, tooltip) = @@ -4032,6 +4036,9 @@ impl GitPanel { window: &mut Window, cx: &mut Context, ) -> Option { + if matches!(self.git_access, GitAccess::No) { + return None; + } let active_repository = self.active_repository.clone()?; let panel_editor_style = panel_editor_style(true, window, cx); let enable_coauthors = self.render_co_authors(cx);