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);