Skip to content

Commit cb543f9

Browse files
authored
Git UI papercuts (#26316)
Release Notes: - Git Beta: added `git:Add` as an alias for the existing `git::Diff` - Git Beta: Fixed a bug where the 'generate commit message' keybinding wasn't working. - Git Beta: Made the empty project diff state a little more helpful with a button to push, and a button to close the item.
1 parent 450d727 commit cb543f9

File tree

4 files changed

+460
-373
lines changed

4 files changed

+460
-373
lines changed

crates/git_ui/src/commit_modal.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
use crate::branch_picker::{self, BranchList};
44
use crate::git_panel::{commit_message_editor, GitPanel};
5-
use git::Commit;
5+
use git::{Commit, GenerateCommitMessage};
66
use panel::{panel_button, panel_editor_style, panel_filled_button};
77
use ui::{prelude::*, KeybindingHint, PopoverMenu, Tooltip};
88

@@ -372,6 +372,11 @@ impl Render for CommitModal {
372372
.key_context("GitCommit")
373373
.on_action(cx.listener(Self::dismiss))
374374
.on_action(cx.listener(Self::commit))
375+
.on_action(cx.listener(|this, _: &GenerateCommitMessage, _, cx| {
376+
this.git_panel.update(cx, |panel, cx| {
377+
panel.generate_commit_message(cx);
378+
})
379+
}))
375380
.on_action(
376381
cx.listener(|this, _: &zed_actions::git::Branch, window, cx| {
377382
toggle_branch_picker(this, window, cx);

0 commit comments

Comments
 (0)