From 9d8d21a4dc804429612791cabea754720e0477ca Mon Sep 17 00:00:00 2001 From: Cole Miller Date: Fri, 24 Jan 2025 15:29:34 -0500 Subject: [PATCH] git: Disable "stage all" checkbox when no entries (#23608) Release Notes: - N/A --- crates/git_ui/src/git_panel.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/git_ui/src/git_panel.rs b/crates/git_ui/src/git_panel.rs index bb665df016ab13c672c9f270dd2dbf0e68fcbfa2..65b0096b73f86ebf0538dd43de0e378e70453aff 100644 --- a/crates/git_ui/src/git_panel.rs +++ b/crates/git_ui/src/git_panel.rs @@ -829,6 +829,7 @@ impl GitPanel { Tooltip::text("Stage all changes", cx) } }) + .disabled(entry_count == 0) .on_click(cx.listener(move |git_panel, _, cx| match all_staged { true => git_panel.unstage_all(&UnstageAll, cx), false => git_panel.stage_all(&StageAll, cx),